snmpwalk works, but check_snmp does not

Patrick Morris patrick.morris at hp.com
Wed Feb 6 02:40:07 CET 2008


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?

-------------------------------------------------------------------------
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/
_______________________________________________
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