[ZBXNEXT-2758] Increase size of formula fields for actions Created: 2015 Mar 26 Updated: 2018 Aug 01 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Installation (I) |
Affects Version/s: | 2.4.3 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Minor |
Reporter: | Kevin Daudt | Assignee: | Rostislav Palivoda |
Resolution: | Unresolved | Votes: | 4 |
Labels: | actions, database, schema | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
MySQL |
Issue Links: |
|
||||
Team: | Team C |
Description |
Currently, the limit for the formula fields is 255 characters. Because we had a node setup once, all our ids are 13 characters long, this means we are limited to at most 12 conditions, which is quite limited |
Comments |
Comment by richlv [ 2015 Mar 26 ] |
could you please clarify what this is about ? |
Comment by Kevin Daudt [ 2015 Mar 26 ] |
This is an error I get when creating an action with 15 conditions (through the API, but this also happens when adding the action through the frontend) The entered formula is "A and B and C and (D or E or F or G or H or I or J or K or L or M or N or O)" where everything between () are hosts.
So this is what is stored in the table after the formula got expanded. Note that we usually use hostgroups to select the hosts in actions, but we want to allow our end-users to select the hosts (and later also hostgroups) to subscribe to, so that's where I ran into this limit. |
Comment by Kevin Daudt [ 2016 Feb 23 ] |
We mitigated this issue a bit by rewriting the IDs so that they are much shorter which gives more room for conditions. Still it would be nice if the maximum number of conditions could be expanded. |
Comment by Guy Martin [ 2018 Jan 11 ] |
Same problem here with PostgresSQL. Value "({149} or {150} or {151} or {153} or {154} or {185} or {383} or {384} or {385} or {386} or {387} or {388} or {389} or {390} or {391} or {392} or {393} or {394} or {152} or {428} or {429} or {430} or {431} or {432} or {433} or {434} or {435} or {436} or {437} or {438} or {439} or {440} or {441} or {442}) and {395} and {396} and {397}" is too long for field "formula" - 335 characters. Allowed length is 255 characters. I've had to split a large subnet in multiple small one to speed up discovery. Now I have a lot of discovery check to match from but I can't add them all. |
Comment by Guy Martin [ 2018 Jan 11 ] |
I've updated the field lengh in include/schema.inc.php and ran "alter table actions alter column formula type character varying(512);" on the DB to workaround the problem. Until the next update I guess. |