It seems my plugins timeout after 10 seconds… Where can I adjust the timeout? I have a few services that are busy and it’s normal for it to sometimes take 20 -30 seconds to respond.
I am not sure but i think this will help you
change the time and give what ever time you are expecting to check in
of your nagios.cfg file
There is a ‘global’ check timeout setting for service checks but it is normally set pretty high by default…
This is the maximum number of seconds that Nagios will allow service checks to run. If checks exceed this limit, they are killed and a CRITICAL state is returned. A timeout error will also be logged.
There is often widespread confusion as to what this option really does. It is meant to be used as a last ditch mechanism to kill off plugins which are misbehaving and not exiting in a timely manner. It should be set to something high (like 60 seconds or more), so that each service check normally finishes executing within this time limit. If a service check runs longer than this limit, Nagios will kill it off thinking it is a runaway processes.
Else, many check plugins have their own way of specifying the timeout for each check on an individual basis… normally if there is one you will see it if you check the help for the plugin. Like for check_tcp…
[blockquote][root@localhost libexec]# ./check_tcp --help
Usage:check_tcp -H host -p port -w ] -c ] -s ]
-e ] -q ]-m ] -d ]
-t ] -r ] -M ] -v] -4|-6] -j]
-D ] -S ] -E]
Seconds before connection times out (default: 10)
How can I implement timeout in my own php plugin?