Ad Widget

Collapse

Trigger event name with expression macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #1

    Trigger event name with expression macros

    Hey guys.
    I've created an SNMP fallback item and a few dependent items from it.
    Code:
    SNMPTRAP
    |--SNMPTRAP Info
    |--SNMPTRAP Serial
    |--SNMPTRAP Severity
    |--SNMPTRAP Title
    Now I wish to create more meaningful triggers with those dependent items.
    For that I tried to use expression macros in the "event name" field, but they are not resolving correctly.

    According to documentation, some functions are allowed as trigger event names.

    As an example, the following trigger checks if the trap severity item is higher than 4, and the event name should use the trap title item.
    Click image for larger version

Name:	image.png
Views:	1663
Size:	11.7 KB
ID:	455638

    The issue is that, when my trigger is true, the generated event does not resolve correctly the defined expression macro.​
    Click image for larger version

Name:	image.png
Views:	1701
Size:	2.4 KB
ID:	455637

    Any tips on how to enhance that trigger?
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    It seems that expression macros are having lots of problems at the moment, here in the forums and in support.zabbix.com, at least:




    If you think your usage is correct, just open an issue and describe your case (or, try to have meaningful additions to existing issues, and remember to vote for the relevant issues), let's see then

    Markku

    Comment


    • markfree
      markfree commented
      Editing a comment
      I'll look into it. Thanks.
  • Semiadmin
    Senior Member
    • Oct 2014
    • 1625

    #3
    The fact is that dependent items are not obtained by zabbix at the same time. If you are lucky and Severity received a few nanoseconds later than Title, then everything is ok, otherwise you get Title from the previous event
    Last edited by Semiadmin; 07-12-2022, 20:52.

    Comment


    • markfree
      markfree commented
      Editing a comment
      That's true, indeed. A few traps were triggered as expected; others did not. Thanks.
Working...