Page 1 of 1

check_snmp timeout issue

Posted: Tue Jul 12, 2016 7:36 pm
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.

Re: check_snmp timeout issue

Posted: Tue Jul 12, 2016 10:22 pm
by Box293
Can you please post the check_snmp command you have defined in your Nagios config file.

Re: check_snmp timeout issue

Posted: Tue Jul 12, 2016 11:11 pm
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.

Re: check_snmp timeout issue

Posted: Wed Jul 13, 2016 2:08 am
by Box293
what is the command definition for check_snmp ?

Code: Select all

define command {
       command_name                             check_snmp
       command_line                             xxxxxxx
}

Re: check_snmp timeout issue

Posted: Wed Jul 13, 2016 2:24 am
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.

Re: check_snmp timeout issue

Posted: Wed Jul 13, 2016 3:49 am
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!

Re: check_snmp timeout issue

Posted: Wed Jul 13, 2016 9:45 am
by rkennedy
Are we good to mark this thread as resolved?