check_nrpe: -u not working correctly?

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
dstensnes
Posts: 2
Joined: Wed Oct 26, 2011 6:52 am

check_nrpe: -u not working correctly?

Post by dstensnes »

Not really sure where to ask this, but I do it here. Can anyone explain to me why these are different?
[nagios@klodrik:~]$ /usr/lib/nagios/plugins/check_nrpe -H 10.0.1.2 -p 5567 -t 40 -u -c check_disk_c0d0p4 ; echo $?
Timeout while attempting connection
2
[nagios@klodrik:~]$ /usr/lib/nagios/plugins/check_nrpe -H 10.0.1.2 -p 5567 -t 20 -u -c check_disk_c0d0p4 ; echo $?
CHECK_NRPE: Socket timeout after 20 seconds.
3
[nagios@klodrik:~]$ /usr/lib/nagios/plugins/check_nrpe -H 10.0.1.2 -p 5567 -t 20 -u -c check_disk_c0d0p4 ; echo $?
CHECK_NRPE: Socket timeout after 20 seconds.
3
[nagios@klodrik:~]$ /usr/lib/nagios/plugins/check_nrpe -H 10.0.1.2 -p 5567 -t 40 -u -c check_disk_c0d0p4 ; echo $?
Timeout while attempting connection
2
10.0.1.2 is blackhole route, and the result of the plugin seems to be dependent on the timeout. I think they both should
return 3, when -u is specified?

State of my system:
[root@klodrik:~]# cat /etc/debian_version
6.0.3
[root@klodrik:~]# dpkg -l nagios\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=======================================-=======================================-==============================================================================================
ii nagios-images 0.7 Collection of images and icons for the nagios system
un nagios-nrpe-doc <none> (no description available)
ii nagios-nrpe-plugin 2.12-4 Nagios Remote Plugin Executor Plugin
un nagios-nrpe-server <none> (no description available)
ii nagios-plugins 1.4.15-3squeeze1 Plugins for the nagios network monitoring and management system
ii nagios-plugins-basic 1.4.15-3squeeze1 Plugins for the nagios network monitoring and management system
ii nagios-plugins-standard 1.4.15-3squeeze1 Plugins for the nagios network monitoring and management system
ii nagios3 3.2.1-2 A host/service/network monitoring and management system
ii nagios3-cgi 3.2.1-2 cgi files for nagios3
ii nagios3-common 3.2.1-2 support files for nagios3
ii nagios3-core 3.2.1-2 A host/service/network monitoring and management system core files
un nagios3-doc <none> (no description available)
ii nagiosgrapher 1.7.1-2+deb60u1 Charting add-on for Nagios
[root@klodrik:~]#
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: check_nrpe: -u not working correctly?

Post by jsmurphy »

Check the nrpe.cfg on your NRPE daemon to see if connection or command timeout is set to 30 seconds. The difference would be at 20 seconds the script is saying it has timed out and therefor the state is unknown, however if it hits 30 seconds the NRPE daemon is telling it that it is taking too long and returning a critical state to the script.

You should also check the max command timeout in your Nagios configuration as well because the default is 30 seconds.
dstensnes
Posts: 2
Joined: Wed Oct 26, 2011 6:52 am

Re: check_nrpe: -u not working correctly?

Post by dstensnes »

Aha, that sounds like a possible scenario. I will do that. Thanks a lot!
Locked