Ad Widget

Collapse

How to express the result of the trigger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frater
    Senior Member
    • Oct 2010
    • 340

    #1

    How to express the result of the trigger?

    Something I've been missing in Zabbix is the ability to express the result of the trigger.
    I can use {ITEM.VALUE} to get the raw data, but quite often I want to display the value that is used in the expression...

    I have tried this:

    Code:
    Site {HOST.CONN} has an average packetloss of more than $1% ({TRIGGER.VALUE})
    Code:
    {Template_Standalone:packetloss[{HOST.CONN}].avg(1h)}>5
    But it will give me:

    Code:
    Site 85.77.251.38 has an average packetloss of more than 5% ({TRIGGER.VALUE})
    I have also tried other stuff, like {{HOST.HOST}:{ITEM.KEY}.avg(1h)}.
    But that just displays

    Code:
    ({ns1.example.com:{ITEM.KEY}.avg(1h)})
    Even this expression does not work (in trigger name):

    {{HOST.HOST}:{ITEM.KEY}.last()}

    I would prefer the support of just {TRIGGER.VALUE} in the name field of the trigger.

    Maybe I'm just making a silly mistake somewhere. I hope so.
    For years I never understood why it is not possible as I often need it.
    Sometimes I create several triggers so I can make the trigger more understable. It would be better if I could just display the value.

    So is it possible?
    If not... will there be an effort to make this possible?
    Last edited by frater; 16-11-2017, 21:28.
    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2


    {TRIGGER.VALUE} Current trigger numeric value: 0 - trigger is in OK state, 1 - trigger is in PROBLEM state.

    {TRIGGER.VALUE}
    is not what you are looking for

    have you tried

    {ITEM.VALUE<1-9>}

    → Trigger-based notifications
    → Trigger names and descriptions
    → Event tags and values Resolved to either:
    1) the historical (at-the-time-of-event) value of the Nth item in the trigger expression, if used in the context of trigger status change, for example, when displaying events or sending notifications.
    2) the latest value of the Nth item in the trigger expression, if used without the context of trigger status change, for example, when displaying a list of triggers in a pop-up selection window. In this case works the same as {ITEM.LASTVALUE}
    In the first case it will resolve to *UNKNOWN* if the history value has already been deleted or has never been stored.
    In the second case, and in the frontend only, it will resolve to *UNKNOWN* if the latest history value has been collected more than the ZBX_HISTORY_PERIOD time ago (defined in defines.inc.php).
    Supported since 1.4.3.

    Comment

    • frater
      Senior Member
      • Oct 2010
      • 340

      #3
      Thanks for replying...

      The macros {ITEM.VALUE1} {ITEM.VALUE2} are, to my interpretation the last values of the items used in expressions.
      In my example I have only 1 item in the expression, so only {ITEM.VALUE1} exists ({ITEM.VALUE} is the same)
      If you think it's otherwise then let me know.

      Don't you think we should have an easy way to display the value we have calculated in the expression?
      Maybe others are using Zabbix in a complete other way, but for me the dashboard is the reason I have Zabbix.

      It will show all the errors that are currently in my "network" and it should tell me in plain English the information I want to know. Preferably without more research.
      Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

      Comment

      Working...