[Solved] Incorrect port speed via SNMP in LibreNMS

Started by craig, October 06, 2023, 12:37:29 PM

Previous topic - Next topic
October 06, 2023, 12:37:29 PM Last Edit: October 06, 2023, 01:20:49 PM by craig
I can't remember when this started happening, but the speed of all my ports is being reported as 1bps via SNMP into LibreNMS.

I have tried manually changing it in LibreNMS - but when the device is re-polled it resets changes back to 1bps.

- OPNsense 23.7.5-amd64
- os-net-snmp version: 1.5_2
- SNMP is configured via V3

Has anyone else experienced this? or have any pointers on what I can do to fix?

October 06, 2023, 12:51:01 PM #1 Last Edit: October 06, 2023, 01:10:43 PM by Monviech
Did you test the OID with a manual SNMP walk yet?

The OID base for "interfaces.ifTable.ifEntry.ifSpeed" is "1.3.6.1.2.1.2.2.1.5"

So you could make an snmp walk from a linux system like this:

snmpwalk -v2c -c public 192.168.100.252 1.3.6.1.2.1.2.2.1.5

And get results like these:


iso.3.6.1.2.1.2.2.1.5.1 = Gauge32: 1000000000
iso.3.6.1.2.1.2.2.1.5.2 = Gauge32: 1000000000
iso.3.6.1.2.1.2.2.1.5.3 = Gauge32: 1000000000
iso.3.6.1.2.1.2.2.1.5.4 = Gauge32: 4294967295
iso.3.6.1.2.1.2.2.1.5.5 = Gauge32: 4294967295
iso.3.6.1.2.1.2.2.1.5.6 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.5.7 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.5.8 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.5.9 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.5.10 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.11 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.12 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.13 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.14 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.15 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.16 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.17 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.18 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.19 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.20 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.21 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.22 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.23 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.24 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.25 = Gauge32: 2820130816
iso.3.6.1.2.1.2.2.1.5.26 = Gauge32: 10000000
iso.3.6.1.2.1.2.2.1.5.27 = Gauge32: 1000000000


1000000000 bps = 1Gbps
4294967295 bps = unknown speed
0 bps = down or disabled

... etc...

(Coming from CheckMK for monitoring so I did a lot of SNMP troubleshooting)

Now you just have to find out if you get a wrong 32bit integer (like 1 = 1bps).
If thats the case, then the SNMP plugin might be wrong, if not, then your monitoring tool might be wrong.


EDIT:

I see something wrong here, its only 32bits integer, that means the maximum speed it can show is 4.29 GBit/s. (4294967295)
So for 10 Gbit/s ports it will probably show wrong numbers.

EDIT2:

In CheckMK I also have wrong values, as seen above. Most VLANs show 2.82 GBit/s and the 10Gbit/s ax ports show 4.29 GBit/s. The only working values are from igb ports which have 100Mbit/s or 1Gbit/s.

EDIT3:
https://oidref.com/1.3.6.1.2.1.2.2.1.5

Quote
Description by cisco_v1
An estimate of the interface's current bandwidth in bits
per second. For interfaces which do not vary in bandwidth
or for those where no accurate estimation can be made, this
object should contain the nominal bandwidth. If the
bandwidth of the interface is greater than the maximum value
reportable by this object then this object should report its
maximum value (4,294,967,295) and ifHighSpeed must be used
to report the interace's speed. For a sub-layer which has
no concept of bandwidth, this object should be zero.

EDIT4:

Testing the ifHighSpeed OID:
snmpwalk -v2c -c public 192.168.100.252 1.3.6.1.2.1.31.1.1.1.15


iso.3.6.1.2.1.31.1.1.1.15.1 = Gauge32: 1000
iso.3.6.1.2.1.31.1.1.1.15.2 = Gauge32: 1000
iso.3.6.1.2.1.31.1.1.1.15.3 = Gauge32: 1000
iso.3.6.1.2.1.31.1.1.1.15.4 = Gauge32: 10000
iso.3.6.1.2.1.31.1.1.1.15.5 = Gauge32: 10000
iso.3.6.1.2.1.31.1.1.1.15.6 = Gauge32: 0
iso.3.6.1.2.1.31.1.1.1.15.7 = Gauge32: 0
iso.3.6.1.2.1.31.1.1.1.15.8 = Gauge32: 0
iso.3.6.1.2.1.31.1.1.1.15.9 = Gauge32: 0
iso.3.6.1.2.1.31.1.1.1.15.10 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.11 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.12 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.13 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.14 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.15 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.16 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.17 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.18 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.19 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.20 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.21 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.22 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.23 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.24 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.25 = Gauge32: 2820
iso.3.6.1.2.1.31.1.1.1.15.26 = Gauge32: 10
iso.3.6.1.2.1.31.1.1.1.15.27 = Gauge32: 1000


It looks like here ax0 and ax1 10Gbit/s is right cause it shows as 10000 Mbps (10 Gbps).

Well, I hope I could help you if you want to troubleshoot. :)
Hardware:
DEC740

I was in the process digging through a manual SNMP walk :)

Looks like the data is correctly returned from opnsense - I assumed it was dodgy as it was resetting values I had previously set in librenms.

It looks like there was a bug in librenms (https://github.com/librenms/librenms/pull/15238) which has now been fixed, so I've updated and it's resolved my issue.

Thanks for the quick reply @Monviech!