Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9655

Trigger Edit function adds quotes around mathematical functions

XMLWordPrintable

      The edit function for Problem and Recovery Expressions will put quotes around mathematical equations causing them to be not executed and treated as a string.

      User Macro: {$WEBSITE.ERROR.RECOVER} = "5m"

      If the recover equation looks like the following:
      count(/camor-test3/web.test.rspcode[Default Page,Load default page],5m,"eq","200")>=max(ceil({$WEBSITE.ERROR.RECOVER}/60),1)

      The math equation max(ceil({$WEBSITE.ERROR.RECOVER}/60),1) is evaluated and returns 5

      If you put the math equation in quotes then the resulting value is "max(ceil(600/60),1)" not the number expected but a string. The "Edit" function for equations always puts quotes around the math equation if it is entered in the Edit screen. If you add this math function in the "Recovery expression" field it works correctly and the value is set to 5. If you then try to use the "Edit" function on the equation it removes the math equation changes the value to 0 (Zero). 

       

      Should the Editor not allow the same functionary that you can do directly in the expression field?

            vmurzins Valdis Murzins
            Chris.M Chris Morgan
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: