Zabbix 2.2.14 User macros are not getting parsed in a script

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Critical
    • None
    • Affects Version/s: 2.2.14
    • Component/s: Server (S)
    • None
    • Environment:
      Zabbix 2.2.14

      I created Macros as {$EXTERNAL_IP} and {$IP_LOCAL}
      and parsing them in the alertscript from Custom media and Action.

      My Action contains following Message:

      '{"Trigger":"{TRIGGER.NAME}","Triggerstatus":"{TRIGGER.STATUS}","Triggerseverity":"{TRIGGER.SEVERITY}","TriggerURL":"{TRIGGER.URL}","ManagerIP":"{$IP_LOCAL}","ExternalIP":"{$EXTERNAL_IP}","{ITEM.NAME1}":"{ITEM.VALUE1}","OriginaleventID":"{EVENT.ID}"}'
      

      And I have taken a log for one event I see this, which means that {$EXTERNAL_IP} and {$IP_LOCAL} are not getting parsed:

      1-----------------
      {"Trigger":"Zabbix agent on vm3 is unreachable for 5 minutes","Triggerstatus":"PROBLEM","Triggerseverity":"High","TriggerURL":"","ManagerIP":"{$IP_LOCAL}","ExternalIP":"{$EXTERNAL_IP}","Agent ping":"Up (1)","OriginaleventID":"1661"}
      2-----------------
      3-----------------
      {"Trigger":"Zabbix agent on vm4 is unreachable for 5 minutes","Triggerstatus":"PROBLEM","Triggerseverity":"High","TriggerURL":"","ManagerIP":"{$IP_LOCAL}","ExternalIP":"{$EXTERNAL_IP}","Agent ping":"Up (1)","OriginaleventID":"1662"}
      {"Trigger":"Zabbix agent on vm4 is unreachable for 5 minutes","Triggerstatus":"PROBLEM","Triggerseverity":"High","TriggerURL":"","ManagerIP":"{$IP_LOCAL}","ExternalIP":"{$EXTERNAL_IP}","Agent ping":"Up (1)","OriginaleventID":"1662"}
      

      However the same configuration is working in Zabbix 3.2

        1. Capture.JPG
          Capture.JPG
          49 kB
        2. alertscript.py
          0.3 kB

            Assignee:
            Unassigned
            Reporter:
            Dibyendu Paul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: