Solved: timeout error nrpe plugin



I have a plug-in on a remote server that takes some time to finish (approx. 3 minutes)
When I try to use the nrpe.plugin to check the remote command I always get an error


The command I use is:

I changed in nagios.cfg

How can I change the Command timeout to 240 second?

Many thanks


how often do you check for this plugin? might be worth running hte command from cron and only downloading the reuslt…

if you need to check it “live” try first checking from command line if you get the time out to work correctly. maybe your command is set up the wrong way.


Thanks for the reply

The script is running on the remote server correctly and I check it on the nagios server on the command line first to test.
The command to check it on the command line I is like

The problem is that the script takes almost 3 minutes before it gives a status for nagios.
Is it not possible the change the execution time more than 60 seconds before nagios gives a timeout
I thought in the nagios.cfg ‘service_check_timeout’ was used to extend the service check timeout.
Any one an idea??

Many thanks


Which means it runs correctly from command line?

what’s the service definition again?
and the relative command definition?


yes it runs correctly from the command line

service definition is

define service{ host_name hostname service_description Check Remote Script check_command check_nrpe_time_out!120!check_remote_script use genericdirectivestemplate }
and the relative command definition is

define command{ command_name check_nrpe_time_out command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t $ARG1$ -c $ARG2$ }
To test it from the command line I run

and then after 60 seconds I get

Its not clear to me why I cannot change the Command time out

average time that the script is running: 90s

Many thanks


I found the problem.
I only changed the command timeout on the nagios server and not on the remote server.
It was the nrpe plug-in who timed out and not nagios.
Thanks anyway


uh? strange it didn’t time out when run from command line… that goes throught the nrpe client too… :confused:

anyway, good it worked :slight_smile: