Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24091

User macros are no longer resolved in function part of error message for triggers and calculated items

XMLWordPrintable

    • S24-W10/11, S24-W12/13
    • 0.3

      Problem description: User macros are no longer resolved in function part of error messages that occur when something is wrong in trigger expression or calculated item formula.

      For example, there's a host with 2 user macros "{$A}" and "{$B}" that have some values. The same host has a trapper item and a trigger with the following expression: 
      find(/test/trap,{$B},"eq",{$A})=0
      Let's imagine that one of these macros has a type-o in it's value, then the error message that would be displayed is the following:

      From this error message it is not clear which macro has the wrong value, because user macros are not resolved in the function part of this error message.

      In 6.0 the behavior is different - the macros are expanded both in function part and the error part of the error message:

      Steps to reproduce:

      1. Create a host with the following 2 User macros:
        1. {$A} = 1q
        2. {$B} = 1h
      2. Create a trapper item with value type numeric(unsigned) for this host
      3. Create a trigger for this host with the following expression: find(/test/trap,{$B},"eq",{$A})=0
      4. Send any numeric value to the created trapper item
      5. Check the error message displayed for the trigger in Data collection => Hosts => <Created host> => Triggers

      Result: In the error message, macros are not resolved in the trigger function part and it's unclear from the error message which macro value caused the error.
      Expected: Same as in 6.0, macros should be resolved in the function part of the error message

            dgoloscapov Dmitrijs Goloscapovs
            solonkins Sergejs Olonkins
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: