net-snmp reporting zero for interface speeds on CentOS 8
My monitoring system is using data from SNMP polls to build graphs. This works fine with a few dozen RHEL 6 and 7 hosts, but graphs for all my new CentOS 8 hosts are not working correctly. I've done some checking and the problem is with the ifSpeed
MIB returning zero for all interfaces except lo
:
$ snmpwalk -v 3 rhel6.foo.internal 1.3.6.1.2.1.2.2.1.5
IF-MIB::ifSpeed.1 10000000
IF-MIB::ifSpeed.2 1000000000
IF-MIB::ifSpeed.3 1000000000
$ snmpwalk -v 3 centos8.foo.internal 1.3.6.1.2.1.2.2.1.5
IF-MIB::ifSpeed.1 10000000
IF-MIB::ifSpeed.2 0
IF-MIB::ifSpeed.3 0
My snmpd.conf
on both boxes is identical, the older systems are running net-snmp 5.7.2 versus 5.8.0 on the new ones. Is there any way I can configure the system to properly return an interface speed?
Solution 1:
Merely another bug in net-snmp abandonware. Report it. It already has a load of those.
But this has nothing to do with the graphs, ifSpeed is a consultational value (that's probably the reason nobody cares about it). Graphs are using counters, even from another table, that doesn't even have the ifSpeed oid - ifXTable. 32-bit counters from ifTable are buried in the past, where 100 MBit/s interfaces were in massive use.