Plugin timeout


#1

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.


#2

Hi,
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

status_update_interval=10

of your nagios.cfg file

512


#3

Hi

There is a ‘global’ check timeout setting for service checks but it is normally set pretty high by default…

[blockquote]Format: service_check_timeout=
Example: service_check_timeout=60

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.
[/blockquote]

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]

-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
…[/blockquote]
HTH

/S


#4

How can I implement timeout in my own php plugin?