SNMP probing is broken for MIBs with objects under different top-level OIDs
SpComb opened this issue · 1 comments
Some common MIBs like SNMPv2-MIB
and IF-MIB
contain objects in multiple different OID trees. While the top-level OID for the SNMPv2-MIB itself is .1.3.6.1.6.3.1
, most of the interesting objects are actually under the legacy .1.3.6.1.2.1.1
system
group, and others under the 1.3.6.1.2.1.11
snmp
groups: http://www.oidview.com/mibs/0/SNMPv2-MIB.html
Probing for the .1.3.6.1.6.3.1
OID will fail if the system only supports the older system
objects, and does not support any of the newer objects defined under the MIB OID.
This affects Linux snmpd, and breaks API queries like GET /api/hosts/test/objects/?object=SNMPv2-MIB::*
- although note that GET /api/hosts/test/objects/SNMPv2-MIB::sysDescr
still works fine, since that isn't limited to probed MIBs.
Simple fix for the GET /api/hosts/test/objects/?object=SNMPv2-MIB::*
issue would be to just forget about the probed MIBs and match against all known objects... however the concept of MIB probing still sounds useful as a feature.