Re: check_snmp hangs

"Broughton, Brian" <[email protected]>
Newsgroups gmane.network.nagios.plugins
Message-ID <B7E29EA4D85C634BB53AE0435724CAD90C768EFE20@SrvExch1.PPHeartland.local>
You are correct the -c is a another type o.

Version of check_snmp I am running
check_snmp v1.4.16 (nagios-plugins 1.4.16)

I downloaded and compiled the latest version Friday, 1.4.16, I was using 1.4.11.

Copy and pasted the entire output from ps -aux | grep snmp
root      1961  0.0  0.0   9448   652 tty1     S+   06:42   0:00 ./check_snmp -H 192.168.98.1 -C PPGI -o iso.3.6.1.2.1.1.3.0 -P2c
root      1962  0.0  0.0  15356  2096 tty1     S+   06:42   0:00 /usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c -c      192.168.98.1:161 iso.3.6.1.2.1.1.3.0

How does check_snmp pass this parameter?

From: Ham, Gerrit van IA60 [mailto:[email protected]]
Sent: Monday, December 03, 2012 3:08 AM
To: Nagios Plugin Help List
Subject: Re: [Nagiosplug-help] check_snmp hangs

Hello Brian,

I guess the '-c' instead of '-C' to specify the community string is also a typo. If I specify this incorrectly I get an error message:
./check_snmp -H testserver -o iso.3.6.1.2.1.1.3.0 -c public -P2c
check_snmp: Invalid critical threshold: %s
- public
Usage:check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-X privpasswd]

Which version of check_snmp are you using? I have 1.72 on RHEL6 and RHEL5.

./check_snmp -V
check_snmp (nagios-plugins 1.4.9) 1.72

Maybe download and compile check_snmp?

Kind regards,

Gerrit van Ham

Van: Broughton, Brian [mailto:[email protected]]
Verzonden: Thursday, November 29, 2012 4:24 PM
Aan: 'Nagios Plugin Help List'
Onderwerp: Re: [Nagiosplug-help] check_snmp hangs

The -p2c is a typo on my part I am using -P2c.

From: Ham, Gerrit van IA60 [mailto:[email protected]]
Sent: Thursday, November 29, 2012 8:55 AM
To: Nagios Plugin Help List
Subject: Re: [Nagiosplug-help] check_snmp hangs

Hello Brian,

I think you have to replace '-p2c' by '-P2c'.
The -p option is used to specify a port,
-P is used to specify the SNMP protocol.
Run check_snmp --help for more information.

Kind regards,

Gerrit van Ham

Van: Broughton, Brian [mailto:[email protected]]
Verzonden: Thursday, November 29, 2012 3:34 PM
Aan: 'nagiosplug-help-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org'
Onderwerp: [Nagiosplug-help] check_snmp hangs

I originally posted this issue to Nagios forums but was directed to present this issue to developers of the plugin, see below.

Issue
Under Host Groups I have the following problem, the uptime on the router is listed as critical, (Service Check Timed Out)

Log file has the following entry Warning:
Attempting to execute the command "/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: Uptime\nHost: RD Cisco 8818\nAddress: 192.168.xxx.xxx\nState: CRITICAL\n\nDate/Time: Wed Nov 28 12:49:00 CST 2012\n\nAdditional Info:\n\n(Service Check Timed Out)\n"

When I manually run check_snmp it hangs.
/usr/local/nagios/libexec# ./check_snmp -H 192.168.xxx.xxx -o iso.3.6.1.2.1.1.3.0 -c comname -p2c
While check_snmp is running I ran:
ps -aux | grep snmp
I get the following output;
/usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c -c   192.168.xxx.xxx:161 iso.3.6.1.2.1.1.3.0

When I manually run snmpget it will return;
snmpget -t 1 -r 5 -m ALL -v 2c -c comname 192.168.xxx.xxx:161 iso.3.6.1.2.1.1.3.0
iso.3.6.1.2.1.1.3.0 = Timeticks: (406909583) 47 days, 2:18:15.83

The community name is not being passed, is this normal?
I have the proper community name listed in switch.cfg, not sure what else I can do.
This is my first pass at setting up and using nagios.
Using Ubuntu 12.10 fresh install.

[cid:[email protected]]<http://www.plannedparenthood.org/heartland/>

Brian Broughton
Network Administrator 1

Planned Parenthood of the Heartland
1171 7th Street, Des Moines, IA 50314
phone: 515.235.0435
fax: 515.280.9525
[email protected]<[email protected]>
www.ppheartland.org<http://www.ppheartland.org/>


________________________________
NOTE: Confidential Information - This e-mail is for the sole use of the intended recipients and contains information belonging to Planned Parenthood of the Heartland, which is confidential and/or legally privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this e-mail information is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by reply e-mail and destroy all copies of the original message.

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
BUILD Helping you discover the best ways to construct your parallel projects.
http://goparallel.sourceforge.net

_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
image001.png (image/png, 7.7 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.