SNMP: No such object available on this agent at this OID

I am trying to monitor the state of a UPS (NetVision), using the provided mib file. So, upsBatteryStatus should be .1.3.6.1.2.1.33.1.2.1.0

snmpwalk -c COMMUNITY -v1 192.168.1.10 .1.3.6.1.2.1.33.1.2.1.0iso.3.6.1.2.1.33.1.2.1.0 = INTEGER: 2

And here comes the tricky part:

snmptranslate -Of SOCOMECUPS-MIB::upsBatteryStatus.iso.org.dod.internet.private.enterprises.socomecSicon.software.network.netvision.upsObjects.upsBattery.upsBatteryStatus

snmptranslate -On SOCOMECUPS-MIB::upsBatteryStatus.1.3.6.1.4.1.4555.1.1.1.1.2.1 Its different from .1.3.6.1.2.1.33.1.2.1.0 , and it doesnt respond with a value.

check_snmp -H 192.168.1.10 -C COMMUNITY -o upsBatteryStatus -w 1 -c @3:7 -m /var/lib/mibs/ietf/NetVision-nv6-unix.mib -l "Battery Status: "

External command error: Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: SOCOMECUPS-MIB::upsBatteryStatus

Any ideas why it isnt recongnizes as upsBatteryStatus ?

2

2 Answers

There seem to be 2 objects with the object name upsBatteryStatus in 2 different MIBs: and . That explains the different OIDs. Nothing wrong with that. The OID is the true identifier of an object, the name is just for us humans.

As far as the error, I don't know what check_snmp does, so cannot say anything about that. But, have you tried this command?

snmpwalk -c COMMUNITY -v1 192.168.1.10 .1.3.6.1.4.1.4555.1.1.1.1.2.1

5

Helpful commands:

snmptranslate -Tp -m /usr/share/mibs/ietf/NetVision-nv6-unix.mib

and:

"upsBatteryStatus" "1.3.6.1.2.1.33.1.2.1"

 | | | | | +--upsBattery(2) | | | | | | | +-- -R-- EnumVal upsBatteryStatus(1) | | | | Values: unknown(1), batteryNormal(2), batteryLow(3), batteryDepleted(4)

Nagios check_snmp command that reported the correct value is:

/usr/local/nagios/libexec/check_snmp -H 192.168.1.10 -C COMMUNITY -m /var/lib/mibs/ietf/NetVision-nv6-unix.mib -o upsBatteryStatus -w @0:1 -c @3:7 -l "Battery Status: "
SNMP OK - Battery Status: 2 | 'Battery Status: '=2;1;7; 

Thank you for help.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like