Ad Widget

Collapse

Zabbix trigger for unused eternet port, trigger when not enough data is available

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • digit23
    Junior Member
    • Aug 2021
    • 7

    #1

    Zabbix trigger for unused eternet port, trigger when not enough data is available

    I'm using zabbix 6.4

    Basically I try to have a report of all ethernet port not used for 30 days on a switch.

    My trigger look like this

    count(/Switch/net.if.status[ifOperStatus.{#SNMPINDEX}],30d,"ne",2) = 0

    Where ifOperStatus 2 mean link down. So if for the last 30d there is no other value than 2, tiggers.

    Problem is, when a new switch is added with some ports down, there is only one value for that port which is 2, so it trigger.

    I don't want to trigger if there is less than 30d of value to be checked. How to do that ?
    Last edited by digit23; 08-01-2024, 17:15.
  • digit23
    Junior Member
    • Aug 2021
    • 7

    #2
    Is that OK ? Better way ?

    # Check 30d ago if we have link down status, if so = true
    count(/Sophos C-Switch by SNMP test/net.if.status[ifOperStatus.{#SNMPINDEX}],1d:now/d-30d,"eq",2) <> 0

    and

    # Check all available status for last 30d, if all down = true
    count(/Sophos C-Switch by SNMP test/net.if.status[ifOperStatus.{#SNMPINDEX}],30d,"ne",2) = 0​
    Last edited by digit23; 08-01-2024, 17:17.

    Comment

    • digit23
      Junior Member
      • Aug 2021
      • 7

      #3
      I hink that will work

      count(/Sophos C-Switch by SNMP test/net.if.status[ifOperStatus.{#SNMPINDEX}],1d:now/d-29d) <> 0

      and

      count(/Sophos C-Switch by SNMP test/net.if.status[ifOperStatus.{#SNMPINDEX}],30d,"ne",2) = 0

      Comment

      • cjbruck
        Junior Member
        • Jun 2024
        • 11

        #4
        Thanks for sharing this. Very useful in finding an unused port when all ports are connected.

        Comment

        Working...