Search code examples
snmpnet-snmp

SNMP net-snmp getting different than expected OID translation


I have RFC1628_UPS_MIB (UPS-MIB) and SNMPv2-SMI (SNMPv2-SMI) installed on my system.

I am using net-snmp tool snmptrapd to receive traps.

Traps from my Liebert NPower UPS are being translated through SNMPv2-SMI rather than UPS-MIB as I expect.

I get SNMPv2-SMI::mib-2.33.1.6.3.16 when I am expecting UPS-MIB::upsAlarmFanFailure

Some troubleshooting information:

    # snmptranslate -On UPS-MIB::upsAlarmFanFailure
    .1.3.6.1.2.1.33.1.6.3.16
    # snmptranslate .1.3.6.1.2.1.33.1.6.3.16
    SNMPv2-SMI::mib-2.33.1.6.3.16

It seems that both MIBS define the same OID and I lost the coin toss. I am very new to SNMP so I don't expect that I have discovered a flaw in the implementation. Can anybody explain what is happening here or point me to a resource that might?


Solution

  • I am answering my own question.

    net-snmp will only use the default set of mibs by default. Adding new mibs to the mibs directory is not enough to get snmptrapd to use the new mib.

    The simplest way to get all of the net-snmp tools to see any new mibs added to the mib directory is to add the line mibs ALL to snmp.conf.

    My system did not have a default snmp.conf so I created the file /etc/snmp/snmp.conf with the single line mibs ALL

    My net-snmp tools including snmptrapd are now able to report the proper oid translations.

    Thanks to @LexLi for prompting me to answer my own question.