Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-2700

Avoid **unknown** in notifications send by triggers

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.4.3
    • Server (S)

      Regarding Email Zabbix actions:

      Because a trigger can refer to more than one item I use following format for mail notifications:

      {ITEM.NAME1}: {HOST.NAME1}: {ITEM.KEY1}: {ITEM.VALUE1}
      {ITEM.NAME2}: {HOST.NAME2}: {ITEM.KEY2}: {ITEM.VALUE2}
      {ITEM.NAME3}: {HOST.NAME3}: {ITEM.KEY3}: {ITEM.VALUE3}

      But when notifications arrive from a trigger that uses only one item, the unused ones are shown as *unknown*.
      That looks IMHO a ugly and misleading - and apparently my Email client (Thunderbird) interprets ** as bold text, so the unknown items appear visually more important than the rest of the mail.

      I have several proposals to solve this:

      • introduce special characters that evaluate the containing macro only if it is defined, e.g.: ?{ITEM.NAME2}? would return nothing if {ITEM.NAME2} is not defined
      • an interpreter, so we can use logic, e.g.:
        if {ITEM.NAME2} then print {ITEM.NAME2} end
        this could be covered by ZBXNEXT-1444
      • a function that returns a list of defined Macros, e.g.
        table({ITEM.NAME},{HOST.NAME})
      • make the returned string configurable, so instead of *unknown* we could choose to return an empty string

            Unassigned Unassigned
            vitaminx callistix
            Votes:
            7 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: