tags:

views:

15

answers:

2

Hi,

How do I set an individual timeout setting per service check. All timeouts default to 60 seconds as per the main configuration but I require that one particular check have a longer timeout due to the execution time.

How can this be done? Please help.

Thanks

A: 

I suggest your pastebin your nagios configuration file so that we can see what you've attempted and comment upon it.

Paul Dragoonis
A: 

EDIT: I just realized you weren't talking about JUST remote service checks so, unfortunately, I need to change my answer to "you can't". If you want to change the timeout settings for service checks then you must apply it to all service checks in the main configuration files.

You'll need to define a second command argument, one that uses your special timeout setting.

For example, this may be your original check in commands.cfg:

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

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

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! It would save a lot of room in my own configuration files.

gnucom