Nagios Timeout Configuration

How to set an individual timeout for each service check. All default timeouts are 60 seconds according to the main configuration, but I require that one particular check have a longer timeout due to the execution time.

How can I do that? Please, help.

thanks

+4
source share
3 answers

As noted in the documentation , this timeout is the last attempt to monitor service checks that are not behaving correctly. If you know that you have a check that will take longer for a good reason, I suggest raising this limit in nagios.cfg. There are no settings to check for service or host that will override this.

+2
source

The best way to solve this problem would be to switch the check from "active" to "passive" execution. Passive verification does not have any time limits from the Nagios system. You will need to include any timeouts, if required, in the passive script / program check. This will allow you to have full control over how long the check should be performed, and even have dismantled checks that are constantly performed, if necessary.

+2
source

EDIT: I just realized that you weren't talking about checking JUST remote services, so unfortunately I need to change my answer to โ€œyou cannotโ€. If you want to change the timeout settings for service checks, you must apply it to all service checks in the main configuration files.

You will need to define the second argument to the command that uses your special timeout.

For example, this could be your initial check in .cfg commands:

define command{ command_name check_nrpe command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ } 

And this will be your identical command with a longer timeout value (also in .cfg commands):

 define command{ command_name check_nrpe_slow command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c $ARG1$ } 

If there is a better way to do this nagios wizards, please let me know! This will save a lot of space in my configuration files.

+1
source

All Articles