Ad Widget

Collapse

How to create trigger on string change that gets back to OK when string changes back

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rmc
    Junior Member
    • Sep 2024
    • 4

    #1

    How to create trigger on string change that gets back to OK when string changes back

    I want to have a trigger on our firewalls that fires when it changes from Active to Passive or vice versa.
    I have one now but that only compares the last value with the current one.
    Trigger:
    (last(/Template Palo Alto Firewall/panSysHAState,#1)<>last(/Template Palo Alto Firewall/panSysHAState,#2))=1

    So if there is a failover from Active to Passive, it fires because the value is different. But since this value is read every minute, after a minute the trigger is OK because then the last value is the same as he current (still Passive).

    What I want is that the trigger stays active until the value gets back to Active.

    Any ideas?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4811

    #2
    So you want trigger to fire, when state turns to "Passive" and stays there until it is Active again?
    I don't know the actual values you collect but if we assume that Active is 0 and passive is 1, then you trigger should be "last(/host/item)=1". Until this value is still 1, that trigger is active, when it turns to 0, trigger resolves... and then you can have second trigger for opposite situation... You cannot have a trigger that is "true" in both cases and fires, when that case changes..

    Comment

    • rmc
      Junior Member
      • Sep 2024
      • 4

      #3
      Exactly what I thought.
      I was just hoping I was missing something...

      Thanks

      Comment

      Working...