Ad Widget

Collapse

How to turn off triggers during a specific period? Zabbix 7

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Quickeyed
    Junior Member
    • Feb 2024
    • 5

    #1

    How to turn off triggers during a specific period? Zabbix 7

    I am trying to adjust a trigger expression with the goal of it not triggering between 04:00 and 05:20.

    I have found some possible solutions, but they are all for much older versions of Zabbix. I am running Zabbix 7 (beta), and it seems to follow the expression rules for Zabbix 6.4 LTS

    This is the current expression for an item that checks for high bandwidth usage on a cisco switch:

    (avg(/Cisco IOS by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) or
    avg(/Cisco IOS by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])) and
    last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0​

    That expression works just fine, now I just need it to not trigger between 04:00 and 05:20.

    Any help would be greatly appreciated.
  • Answer selected by Quickeyed at 14-02-2024, 09:39.
    Quickeyed
    Junior Member
    • Feb 2024
    • 5

    Solved it:

    (avg(/Cisco IOS by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) or avg(/Cisco IOS by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])) and last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0 and (time()<040000 or time()>052000)

    So by adding and "(time()<040000 or time()>052000)", it works as intended

    Comment

    • Quickeyed
      Junior Member
      • Feb 2024
      • 5

      #2
      Solved it:

      (avg(/Cisco IOS by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) or avg(/Cisco IOS by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])) and last(/Cisco IOS by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0 and (time()<040000 or time()>052000)

      So by adding and "(time()<040000 or time()>052000)", it works as intended

      Comment

      Working...