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

Change of Usermacro is not reflected in Javascript preprocessing.

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 7.0.8, 7.2.2
    • Server (S)
    • None

      Steps to reproduce:

      1. Create host with usermacro {$SETTINGS} with some value - for example "init"
      2. Create Script type Item with parameters "vstup" and value "{$SETTINGS}" and 10sec update interval
      3. Insert Javascript: return value
      4. Create javascript preprocessing step with parameters: return "prep: " + '{$SETTINGS}' + " value: "  + value;
      5. value in latest data will be like :     
        prep: init value: {"vstup":"init"}
      6. Change macro value of {$SETTINGS} macro to something else - "change"

      Result:

      result on Zabbix version 7.0.8 or 7.2.2 will be :

      prep: init value: {"vstup":"change"}

      Expected:

      but correct result is:

      prep: change value: {"vstup":"change"}

      It works correctly in Zabbix 6.4.

       

      The change of macro is reflected in preprocessing only after change of item ( disable/enable or preprocessing script change) 

       

      Zabbix Host Export for testing is in appended file
       

            zabbix.dev Zabbix Development Team
            alois.zadrazil Alois Zadrazil
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: