Ad Widget

Collapse

How to monitor percentage utilization of interfaces

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FresKubas
    Junior Member
    • Dec 2024
    • 2

    #1

    How to monitor percentage utilization of interfaces

    Hello, today I installed Zabbix 7.2 upgraded from 4.2. In the old Zabbix, I had items to monitor the percentage utilization of interfaces using net.if.speed. Is it possible to use the same item in 7.2? I can't find it
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4961

    #2
    net.if.speed is not a built-in item... not even in 4.2... Was it a userparameter you had installed? It should work in newer version also..

    Comment

    • FresKubas
      Junior Member
      • Dec 2024
      • 2

      #3
      From what I can see, net.if.speed is provided with the Zabbix agent template for Linux, but I can't find a host that supports it. I see the item reaches into /sys/class/.. but there's no information there about interface speed. On older machines, plain net.if.speed returns this information. Perhaps I just need to write a separate script to check interface speed and then create a calculated item to calculate percentage utilization.

      Comment

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

        #4

        https://git.zabbix.com/projects/ZBX/...at=release/7.2
        Interface {#IFNAME}: Speed It indicates the latest or current speed value of the interface. The value is an integer representing the link speed expressed in bits/sec.

        This attribute is only valid for the interfaces that implement the ethtool get_link_ksettings method (mostly Ethernet).

        Reference: https://www.kernel.org/doc/Documenta...ysfs-class-net
        Zabbix agent vfs.file.contents["/sys/class/net/{#IFNAME}/speed"]

        Preprocessing
        • Custom multiplier: 1000000
        • Discard unchanged with heartbeat: 1h
        mentioned file in this item contains IF speed...

        There is no such item as net.if.speed. And never was...
        Last edited by cyber; 13-03-2025, 11:06.

        Comment

        • SpaceKnight
          Junior Member
          • Aug 2026
          • 1

          #5
          Need some help. I'm in the process of migrating my network to Zabbix. There are more than 13,000 interfaces across more than 200 nodes.
          The challenge I'm facing with utilization alerts is that I can't use the Speed item to determine the percentage utilization of an interface, especially for LACP bundles and trunk interfaces, since these bundles consist of multiple physical interfaces.
          For example, let's say I have four 10 Gbps links configured as an LACP bundle. The physical capacity of the bundle is 40 Gbps, but I have only purchased 30 Gbps of bandwidth. The additional interface is part of the bundle for redundancy, so that if one of the links goes down, the traffic remains unaffected.
          Therefore, I want my interface utilization alerts to be calculated based on the actual purchased bandwidth rather than the physical capacity of the bundle.
          For example:
          Percentage Utilization = Current Utilization ÷ Actual Purchased Bandwidth × 100
          In this case, the utilization should be calculated against 30 Gbps instead of the bundle's physical capacity of 40 Gbps.
          I would like to know the recommended way to implement this in Zabbix.

          Comment


          • troffasky
            troffasky commented
            Editing a comment
            I think this really needs a new thread, as it's not particularly related to this one.
        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4961

          #6
          So don't multiply by 100... try 75... Or my coffee has not kicked in yet...

          Comment

          • troffasky
            Senior Member
            • Jul 2008
            • 631

            #7
            I think you want to reference a macro in your template trigger definition. Then at host/interface level, override the macro with whatever the correct number is.

            Comment

            • troffasky
              Senior Member
              • Jul 2008
              • 631

              #8
              This is already done in factory templates.

              Code:
              Problem: (avg(/Interfaces by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Interfaces by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) or avg(/Interfaces by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Interfaces by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])) and last(/Interfaces by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0
              Recovery: avg(/Interfaces by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Interfaces by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) and avg(/Interfaces by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Interfaces by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])
              To override, you define a macro $IF.UTIL.MAX:"{#IFNAME}" on the host, where {#IFNAME} is the interface name as discovered by Zabbix.

              Comment

              Working...