snmp_checks return odd junk
James Affeld
jamesaffeld at yahoo.com
Fri Nov 3 22:18:13 CET 2006
Thanks - updating to plugins version 1.4.5 from 1.4.3 fixed.
----- Original Message ----
From: Andreas Ericsson <ae at op5.se>
To: James Affeld <jamesaffeld at yahoo.com>
Cc: nagios-users at lists.sourceforge.net
Sent: Friday, November 3, 2006 3:16:10 AM
Subject: Re: [Nagios-users] snmp_checks return odd junk
James Affeld wrote:
> When I run just about any kind of SNMP check, I get suitable info at the beginning of the response, but a bunch of junk at the end. It even runs into the next command line. As you might gather, this is done via an ssh connection, using putty.
>
> root at silmec2:/usr/local/nagios/libexec# ./check_snmp -H 10.139.7.1 -o .1.3.6.1.4.1.9.9.48.1.1.1.6.1 -C REDACTED -P 1
> SNMP OK - 17448296 | iso.3.6.1.4.1.9.9.48.1.1.1.6.1=17448296Üjú·ôB¿¹ÈÈÜjú·ÔB¿`B¿¨B¿¢é·;;;;
> root at silmec2:/usr/local/nagios/libexec# PuTTYPuTTYPuTTYPuTTYPuTTY
>
> If I do an snmpwalk vs. that OID, it returns cleanly.
>
> root at silmec2:/usr/local/nagios/libexec# snmpwalk 10.139.7.1 iso.3.6.1.4.1.9.9.48.1.1.1.6.1 -c REDACTED -v 1
> SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1 = Gauge32: 17390392
> root at silmec2:/usr/local/nagios/libexec#
>
>
> I run into the same problem checking a Cisco Catalyst 6009 and HP 2524 switches. Any clues?
>
Sounds like the buffer used to contain the string gotten back from
snmpget isn't NUL-terminated. I vaguely remember this as a bug in the
runcmd functions in the plugins when they were first introduced (mea
culpa). It was a pretty bizarre error and only appeared
if(strlen(output) % sizeof(long) == 0), so it's not easily reproducable.
Try updating the plugin package at silmec2 and see if that fixes it.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list