Ad Widget

Collapse

Macro Dependent Trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HANDL_Eric
    Junior Member
    • Aug 2023
    • 27

    #1

    Macro Dependent Trigger


    Hello,

    we're in the process of building some interface alert triggers for our SonicWall boxes and want to make them only active if we explicitly add a macro value of 1 specific to the interface on the host. We started by adding a problem expression monitoring interface state however right off the bat, every interface triggered and we're having a hard time understanding why.

    Here is the problem expression we used:
    {$IFCONTROL:"{#SNMPVALUE}"}=1 and last(/Sonicwall via SNMP/net.if.status.[{#SNMPINDEX}])=2
    In troubleshooting we even went to the host object for one of the test firewalls and added a macro of {$IFCONTROL:"U0"} with the value set to 0, but the alert for that interface still didn't clear. Are we mis-understanding the scope or use of macros here?


    Prototype Config:
    Click image for larger version

Name:	Prototype.png
Views:	475
Size:	31.5 KB
ID:	482384

    Host Macros:
    Click image for larger version

Name:	Macro.png
Views:	368
Size:	10.0 KB
ID:	482385
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    https://www.zabbix.com/documentation..._location_user Triggers


    In a trigger configuration, user macros can be used in the following fields:
    Name yes
    Operational data yes
    Expression (only in constants and function parameters; secret macros are not supported) yes
    Description yes
    URL3 yes
    Tag for matching yes
    Tags2
    Tag names yes
    Tag values yes

    So ... no, you cannot use it, like you do...

    Comment

    • HANDL_Eric
      Junior Member
      • Aug 2023
      • 27

      #3
      Originally posted by cyber
      https://www.zabbix.com/documentation..._location_user Triggers


      In a trigger configuration, user macros can be used in the following fields:
      Name yes
      Operational data yes
      Expression (only in constants and function parameters; secret macros are not supported) yes
      Description yes
      URL3 yes
      Tag for matching yes
      Tags2
      Tag names yes
      Tag values yes

      So ... no, you cannot use it, like you do...
      Alright, as i'm personally still not great with scopes here and still in the learning phase, how would I achieve this functionality?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        If it is a discovery based anyway, you can add overrides to discovery, so only certain triggers get added and enabled. It may not be exactly, what you need (turning something on and off on the fly), but it is kind of step in that direction...

        Comment

        Working...