On Fri, Apr 10, 2009 at 12:57, Natalie Aloi <span dir="ltr"><<a href="mailto:aloi@experisdatacenters.com">aloi@experisdatacenters.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff"><div><font size="2" face="Verdana"></font></div>
<div><font size="2" face="Verdana">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<br>I also tried another oid and the values generated are identical for the snmpwalk and the snmpget<br>
<br>(the one for the upsBatteryStatus is the one I am curious about)<br><br>[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<br>SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds<br>
<br>[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<br>SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1)<br>[root@nagios mibwalk]#<br><br>Data from snmpwalk is below:</font></div>

<div><font size="2" face="Verdana"><br>UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2)</font></div>
<div><font size="2" face="Verdana">UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds</font></div>
<p><font size="2" face="Verdana"></font></p></div></blockquote><div><br><br>try something like:<br><br>       snmpget   -v 1 -c public   <font size="2" face="Verdana">10.1.102.40   SNMPv2-SMI::mib-2.33.1.2.1.0</font><br>
<br>Assuming SNMP-v1; try with "-v 2c" as well, to see which one matches your results.  I don't have a commandline available to check which the snmp command plugin uses, but maybe this will give you an idea whether the snmpwalk differs form the snmpget result, perhaps an avenue to investigate further.<br>
<br>Allan<br><br></div></div>-- <br><a href="mailto:allanc@chickenandporn.com">allanc@chickenandporn.com</a>  "½ًسم" <a href="http://linkedin.com/in/goldfish">http://linkedin.com/in/goldfish</a><br>please, no proprietary attachments (<a href="http://tinyurl.com/cbgq">http://tinyurl.com/cbgq</a>)<br>