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

Macro {EVENT.VALUE} is not substituted properly in webhooks

XMLWordPrintable

    • Sprint 61 (Feb 2020), Sprint 62 (Mar 2020)
    • 0.25

      {EVENT.VALUE}

      macro can be used to get status of problem.
      According to the documentation:

      Numeric value of the event that triggered an action (1 for problem, 0 for recovering).

      Consider the following use case:

      1. Create trapper item (item trap on host hvost)
      2. Create trigger {hvost:trap.last()}=1
      3. Create two media types (email and webhook) and add messages for problem, resolve and update (use {EVENT.VALUE} macro in both email messages and webhook).
      4. Send value 1 for trapper item. Problem is generated, and messages are sent.
      5. Send value 0 for trapper item. Problem is resolved, messages are sent.
      6. Use problem acknowledge dialog to leave a message (different user should be used to get notifications) without changing anything else.
      7. Observe that {EVENT.VALUE} macro is valid for email, but is not valid for webhook (showing 1 instead of 0).

      Results for email (macro used in subject, value is number in brackets):

      Results for webhook (webhool throws values or three macros, last one is
      {EVENT.VALUE}):

        1. emails.png
          emails.png
          4 kB
        2. webhook1.png
          webhook1.png
          35 kB
        3. webhook2.png
          webhook2.png
          36 kB
        4. webhook3.png
          webhook3.png
          36 kB

            ak Andrejs Kozlovs
            vjaceslavs Vjaceslavs Bogdanovs
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: