check_snmp timeout issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mhunt
Posts: 7
Joined: Mon Jun 20, 2016 1:33 am

check_snmp timeout issue

Post by mhunt »

I'm trying to get the following check_snmp command to work:
check_snmp!-c mysnmpcommunity -o sysUpTime.0 -t 60

But I'm getting the error of (Service check timed out after 60.05 seconds). In the log I see:

[07-12-2016 19:06:52] wproc: Core Worker 12854: job 0 (pid=12985): Dormant child reaped
[07-12-2016 19:06:52] Warning: Check of service 'Port 1 Link Status' on host 'srw2016' timed out after 60.047s!
[07-12-2016 19:06:52] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
[07-12-2016 19:06:52] wproc: host=srw2016; service=Port 1 Link Status;
[07-12-2016 19:06:52] wproc: CHECK job 0 from worker Core Worker 12854 timed out after 60.05s
[07-12-2016 19:06:52] wproc: Core Worker 12854: job 0 (pid=12985) timed out. Killing it

I know it's responding, other snmp network monitoring programs I have ran work fine. I read over the tracker log at http://tracker.nagios.org/view.php?id=529, but I'm running 4.1.1 so I'm not sure where to go from here.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_snmp timeout issue

Post by Box293 »

Can you please post the check_snmp command you have defined in your Nagios config file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mhunt
Posts: 7
Joined: Mon Jun 20, 2016 1:33 am

Re: check_snmp timeout issue

Post by mhunt »

uptime:
check_snmp!-c tpfndsnmp -o sysUpTime.0 -t 60

Port 1:
check_snmp!-c tpfndsnmp -o ifOperStatus.1 -r 1 -m RFC1213-MIB -t60

tpfndsnmp is my community string. I also am running Spiceworks Network Monitor on the switch, so I know the community string works.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_snmp timeout issue

Post by Box293 »

what is the command definition for check_snmp ?

Code: Select all

define command {
       command_name                             check_snmp
       command_line                             xxxxxxx
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: check_snmp timeout issue

Post by rhassing »

Did you specify the Hostaddress somewhere?

Code: Select all

#check_snmp 10.10.10.1 -c public -o sysUpTime.0 -t 60
SNMP OK - Timeticks: (3218016033) 372 days, 10:56:00.33 | 
This does work for me.
Please try to execute the check on the commandline.
Rob Hassing
Image
mhunt
Posts: 7
Joined: Mon Jun 20, 2016 1:33 am

Re: check_snmp timeout issue

Post by mhunt »

I got it. I had -c communitystring, it's supposed to be -C communitystring. -c is for "Critical threshold range(s)". Now It's all green!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_snmp timeout issue

Post by rkennedy »

Are we good to mark this thread as resolved?
Former Nagios Employee
Locked