check_snmp issue

Andreas Ericsson ae at op5.se
Thu Feb 14 14:10:15 CET 2008


mark.potter at academy.com wrote:
> 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
> 

You can now also drop "-m GSA-MIB" from the command line.

I suspect this problem crops up due to the environment being NULL and
nothing when the plugin runs snmpget. Do you have some snmp-specific
settings in your environment?

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

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