snmpwalk works, but check_snmp does not

Roger Roger at NagiosWiki.com
Thu Feb 7 01:05:41 CET 2008


On Feb 5, 2008 5:40 PM, Patrick Morris <patrick.morris at hp.com> wrote:

> Hi Roger!
>
> On Tue, 05 Feb 2008, Roger wrote:
>
> > From CentOS (does not work)
> >
> > [root at nagios03 plugins]# pwd
> > /usr/lib/nagios/plugins
> > [root at nagios03 plugins]# ./check_snmp -C myPublicString -o
> nsVpnMonP2State.0 -l DC_VPN_Status -c 1: -H 10.0.11.9<http://10.0.11.9>
> > DC_VPN_Status problem - No data received from host
> > CMD: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c myPublicString
> 10.0.11.9:161<http://10.0.11.9:161> nsVpnMonP2State.0
> >
> > From Gentoo (works)
> >
> > nagios01 libexec # pwd
> > /usr/nagios/libexec
> > nagios01 libexec # ./check_snmp -C myPublicString -o nsVpnMonP2State.0-l DC_VPN_Status -c 1: -H
> 10.0.11.9<http://10.0.11.9>
> > DC_VPN_Status OK - 1 | NETSCREEN-VPN-MON-MIB::nsVpnMonP2State.0=1;;;;
> >
> > Normally, I'd think that it is an issue with the polled device not being
> configured properly, but since I can 'snmpwalk' it from the CentOS box in
> question, I'm not sure what to do.
>
> Two things:
>
> First, never manually check a plugin as root, as you often won't get the
> same results you would as the user Nagios runs as.  That probably won't
> help in this case, but it will almost certainly bite you in the ass in
> the future.
>
> Second, you've got the snmpget command being sent to the box... what
> happens when you run that (again, use the user Nagios runs as)?
>
> When you do an snmpwalk, are you able to see the nsVpnMonP2State OID?
>

The problem actually turned out to be the fact that that OID-MIB association
wasn't on that box.  So I scp'd the contents of the /etc/snmp folder to the
new box, and everything works perfectly now.

(Thank you for your time in responding to my email, Patrick.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080206/a2442110/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
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