LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   snmp/nagios (https://www.linuxquestions.org/questions/linux-software-2/snmp-nagios-718250/)

nataloi 04-10-2009 11:54 AM

snmp/nagios
 
Hello All hopefully I am posting this issue in the correct forum

I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2
I also tried another oid and the values generated are identical for the
snmpwalk and the snmpget

(the one for the upsBatteryStatus is the one I am curious about)

[root@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0
SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds

[root@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0
SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1)
[root@nagios mibwalk]#


UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2)
UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds

Thanks for any help you can provide.

jantman 04-11-2009 11:20 PM

You might want to try asking this on a nagios forum (http://forums.meulie.net/viewforum.php?f=60).

However, I will recommend that you try:
1) test running the check plugin (with the exact args that are getting passed to it) *as the nagios user*.

2) Try using full numerical OIDs for what you want to check.


All times are GMT -5. The time now is 01:40 AM.