[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:
Duplicate
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 ?
which action-related field is limiting you ?

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.

Value "'

Unknown macro: {200200000000080}

and

Unknown macro: {200200000000081}

and

Unknown macro: {200200000000082}

and (

Unknown macro: {200200000000083}

or

Unknown macro: {200200000000084}

or

Unknown macro: {200200000000085}

or

Unknown macro: {200200000000086}

or

Unknown macro: {200200000000087}

or

Unknown macro: {200200000000088}

or

Unknown macro: {200200000000089}

or

Unknown macro: {200200000000090}

or

Unknown macro: {200200000000091}

or

Unknown macro: {200200000000092}

or

Unknown macro: {200200000000093}

or

Unknown macro: {200200000000094}

)'" is too long for field "formula" - 316 characters. Allowed length is 255 characters.

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.

Generated at Thu Mar 28 13:28:07 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.