2

I'm using cricket to do some simple monitoring (including network devices) of my Debian-based servers.

The interfaces are identified by name (e.g. eth0, eth1,...), and cricket maps these names to the proper OIDs by looking them up in IF-MIB::ifDescr:

$ snmpwalk -Os -c public -v 1 wheezy 1.3.6.1.2.1.2.2.1.2
iso.3.6.1.2.1.2.2.1.2.1 = STRING: "lo"
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "eth0"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "eth1"

Everything worked cool until I upgraded my machine to Debian/jessie today. Now the reported interface names are a long description of the brand:

$ snmpwalk -Os -c public -v 1 jessie 1.3.6.1.2.1.2.2.1.2
iso.3.6.1.2.1.2.2.1.2.1 = STRING: "lo"
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "Intel Corporation 82576 Gigabit Network Connection"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "Intel Corporation 82576 Gigabit Network Connection"

While I find the long name annoying enough, it becomes useless as it is no longer unique: since the machine in question has two identical network cards built in, I just get the same name twice.

Is there a way to make snmpd report the short interface names?

1

It seems that using IF-MIB::ifDescr for the interface name is simply wrong. As the name of the OID implies, this is meant to be a (verbose) description ofthe interface, rather than a (unique) name.

The proper OID to use is IF-MIB::ifName

$ snmpwalk -Os -c public -v 1 wheezy 1.3.6.1.2.1.31.1.1.1.1
iso.3.6.1.2.1.31.1.1.1.1.1 = STRING: "lo"
iso.3.6.1.2.1.31.1.1.1.1.2 = STRING: "eth0"
iso.3.6.1.2.1.31.1.1.1.1.3 = STRING: "eth1"

$ snmpwalk -Os -c public -v 1 jessie 1.3.6.1.2.1.31.1.1.1.1
iso.3.6.1.2.1.31.1.1.1.1.1 = STRING: "lo"
iso.3.6.1.2.1.31.1.1.1.1.2 = STRING: "eth0"
iso.3.6.1.2.1.31.1.1.1.1.3 = STRING: "eth1"

In the case of cricket this means that i changed the cricket-configuration of the interface-map to:

OID    ifName                 1.3.6.1.2.1.31.1.1.1.1 

map interface-name
    base-oid    =   ifName
    match       =   %interface-name%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.