check_snmp issue

mark.potter at academy.com mark.potter at academy.com
Tue Feb 12 17:18:59 CET 2008


nagios-users-bounces at lists.sourceforge.net wrote on 02/12/2008 10:06:16 
AM:

> 
> 
> > -----Original Message-----
> > From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> > bounces at lists.sourceforge.net] On Behalf Of mark.potter at academy.com
> > Sent: Tuesday, February 12, 2008 9:39 AM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] check_snmp issue
> > 
> > 
> > Thank you all for the comments on the parenting issue I posted
> yesterday.
> > We have come up with a much easier solution than had been proposed.
> 
> What did you end up with?

host -> gateway -> router

Which is actually not much of a change from how we are already doing it.

> 
> > I am now having an issue with check_snmp. I have used check_snmp to
> > monitor this exact service in the past on other Nagios hosts and am
> using
> > other snmp checks as well from the current host. Here is the problem:
> > 
> > nagios at ulapnag01:/usr/local/nagios/libexec> /check_snmp -H peapgse01
> -o
> > GSA-MIB::crawlRunning.0 -C public -m GSA-MIB -P 2c -d "="
> > SNMP problem - No data received from host
> > CMD: /usr/bin/snmpget -t 1 -r 5 -m GSA-MIB -v 2c -c public
> peapgse01:161
> > GSA-MIB::crawlRunning.0
> > 
> > But if I run the command it shows, exactly:
> > 
> > nagios at ulapnag01:/usr/local/nagios/libexec> /usr/bin/snmpget -t 1 -r 5
> -m
> > GSA-MIB -v 2c -c public peapgse01:161  GSA-MIB::crawlRunning.0
> > GSA-MIB::crawlRunning.0 = INTEGER: Running(1)
> 
> Not a direct answer but to troubleshoot I'd run check_snmp in verbose
> mode (-v). That will cause it to print the output it receives from
> snmpget. You'll at least know then if the problem is with the call to
> snmpget or the parsing of its output. I'd also run 'strace -Ffs512
> ./check_snmp ...' and look for the sendto and recvfrom lines which would
> be the communication with the remote snmp agent just to verify that
> there is data flowing both ways. I'd also drop the -d "=" since that's
> the default anyway. I'd try using the numeric OID instead of
> GSA-MIB::crawlRunning.0 to eliminate MIB loading/parsing issues. And
> finally, I'd use IP or FQDN for the hostname to eliminate resolution
> issues.
> 
> --
> Marc

Sometimes you can't see the forest for the trees. It was an MIB issue. 
Using the numeric OID gets the result I need. Thank you for the advice. 
Taking it step by step solved my issue:
nagios at ulapnag01:/usr/local/nagios/libexec> ./check_snmp -v -H peapgse01 
-o .1.3.6.1.4.1.11129.1.1.1.0 -C public -m GSA-MIB -P 2c
/usr/bin/snmpget -t 1 -r 5 -m GSA-MIB -v 2c -c public peapgse01:161 
1.3.6.1.4.1.11129.1.1.1.0
iso.3.6.1.4.1.11129.1.1.1.0 = INTEGER: 1

SNMP OK - 1 | iso.3.6.1.4.1.11129.1.1.1.0=1

Would be nice to use the MIB but totally unnecessary and I don't feel like 
bothering to troubleshoot it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080212/43d27dde/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