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
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.
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??
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
Hi
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