<html><DIV><FONT face=Verdana color=#0000ff size=2>Thanks Allan! That's what its doing a getnext - see below!</FONT></DIV>
<DIV><FONT color=#0000ff size=2>note mib oid and value!</FONT></DIV>
<DIV><FONT color=#0000ff size=2></FONT> </DIV>
<DIV>[root@nagios mibwalk]#  snmpgetnext -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.1.5.0<BR>SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1<BR>[root@nagios mibwalk]#</DIV>
<DIV> </DIV>
<DIV>hmmm now I need to figure out how to tell nagios to do a walk on that oid...<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Allan Clark [mailto:allanc@chickenandporn.com]<BR><B>Sent:</B> Friday, April 10, 2009 01:57 PM<BR><B>To:</B> 'Natalie Aloi'<BR><B>Cc:</B> 'Nagios Users Mail-list'<BR><B>Subject:</B> Re: [Nagios-users] trouble w/SNMP<BR><BR></FONT><BR><BR>
<DIV class=gmail_quote>2009/4/10 Natalie Aloi <SPAN dir=ltr><<A href="mailto:naloi@experisdatacenters.com" target=_blank mce_href="mailto:naloi@experisdatacenters.com">naloi@experisdatacenters.com</A>></SPAN><BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV><FONT face=Verdana color=#0000ff size=2><BR>£¨moved top-post)<BR></FONT></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px"><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Allan Clark [mailto:<A href="mailto:allanc@chickenandporn.com" target=_blank mce_href="mailto:allanc@chickenandporn.com">allanc@chickenandporn.com</A>]<BR><B>Sent:</B> Friday, April 10, 2009 01:19 PM<BR><B>To:</B> 'Natalie Aloi'<BR><B>Cc:</B> 'Nagios Users Mail-list'<BR><B>Subject:</B> Re: [Nagios-users] trouble w/SNMP<BR><BR></FONT>
<DIV class=im>On Fri, Apr 10, 2009 at 12:57, Natalie Aloi <SPAN dir=ltr><<A href="mailto:aloi@experisdatacenters.com" target=_blank mce_href="mailto:aloi@experisdatacenters.com">aloi@experisdatacenters.com</A>></SPAN> wrote:<BR></DIV>
<DIV class=gmail_quote>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV bgcolor="#ffffff">
<DIV><FONT face=Verdana size=2></FONT></DIV>
<DIV><FONT face=Verdana size=2>
<DIV class=im>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></DIV>
<DIV class=im>[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:</DIV></FONT></DIV>
<DIV class=im>
<DIV><FONT face=Verdana size=2><BR>UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2)</FONT></DIV>
<DIV><FONT face=Verdana size=2>UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds</FONT></DIV>
<P><FONT face=Verdana size=2></FONT></P></DIV></DIV></BLOCKQUOTE>
<DIV class=im>
<DIV><BR><BR>try something like:<BR><BR>       snmpget   -v 1 -c public   <FONT face=Verdana size=2>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</DIV></DIV></DIV></BLOCKQUOTE></BLOCKQUOTE></DIV><FONT face=Verdana color=#0000ff size=2><BR></FONT><FONT face=Verdana color=#0000ff size=2>> [root@nagios mibwalk]# snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0<BR>> SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1<BR>> [root@nagios mibwalk]#<BR></FONT>
<DIV>>  <BR></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2>> Huh? - weird! why would snmpget give me 1, but walk gives me 2?</FONT></DIV><BR>If we assume Nagios is doing snmpget rather than snmpwalk, then the problem is slightly different: how would we get snmpget to produce the desired/accurate "2" rather than "1".<BR><BR>For giggles, try:<BR><BR>      <FONT face=Verdana color=#0000ff size=2>snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1<BR><BR>(dropping the .0)<BR><BR>I'm curious about this because I remember something with snmpwalk needing a .0 in places where snmpget didn't seem to.  Don't recall exactly what it was.<BR><BR clear=all></FONT>Allan<BR>-- <BR><A href="mailto:allanc@chickenandporn.com" target=_blank mce_href="mailto:allanc@chickenandporn.com">allanc@chickenandporn.com</A>  "½ðÓã" <A href="http://linkedin.com/in/goldfish" target=_blank mce_href="http://linkedin.com/in/goldfish">http://linkedin.com/in/goldfish</A><BR>please, no proprietary attachments (<A href="http://tinyurl.com/cbgq" target=_blank mce_href="http://tinyurl.com/cbgq">http://tinyurl.com/cbgq</A>)<BR>Sent from New York, NY, United States </BLOCKQUOTE></html>