[feat] provide physical network interface MAX speed metric

Currently netdata have metric

netdata_net_speed_kilobits_persec_average{chart="net_speed.gig0",family="gig0",dimension="speed"} 1000000.0000000 1679719048000

This mean that “iface gig0 connected on 1Gbit/sec phy speed”

We need to know situation when link may be:

  • connected
  • full duplex
  • carrier up

But, not at full speed (for example on 100Mbit/s instead 1000Mbit/s). If netdata provide MAX speed metric for a network physdev’s, the query for alert will be:

netdata_net_speed_kilobits_persec_average < netdata_net_speed_kilobits_max

And does’t matter if this 1Gbit or 25Gbit iface, one alert will cover any kind of this case

What exactly problem we try find and then fix

  1. Server has 25G NIC ports
  2. Engineers by mistake connect server with 10G SFP’s transceivers
  3. Link works on 10G, not at 25G
  4. We don’t know about that, because carrier is up, duplex is full :face_holding_back_tears:

Kernel interface for get this and many other physdev information

ethtool.h

1 Like

The Github issue: [Feat]: provide physical network interface MAX speed metric · Issue #14803 · netdata/netdata · GitHub

Also finded out that netdata_net_speed_kilobits_persec_average was not exported for bond devices

Settings for po1:
        Supported ports: [  ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 2000Mb/s
        Duplex: Full
        Auto-negotiation: off
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Link detected: yes

Seems alerts from health.d never be fired for bond devices