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

Avoid **unknown** in notifications send by triggers

    XMLWordPrintable

    Details

    • Type: Change Request
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.3
    • Fix Version/s: None
    • Component/s: Server (S)

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vitaminx vitaminx
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: