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

Details

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

    Description

      {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}):

      Attachments

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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: