linuxhttpnagiosnagiosxi

How to have custom warning and critical time for nagios check_http?


My current service definition for a host looks like this

define service{
        use                             xyzserver        
        host_name                       backup.xyz.com
        service_description             http
        check_command                   check_http  #??
        }

I want to increase the warning and critical time to 5 minute(warning) and 10 minutes(critical) for check_http

the command definition looks like this on my nagios server

# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
        }

I have run the check_http directly on commandline like below and it outputs as expected but i dont know where to exactly place the arguments like - warning ,critical,timeout and port number in the "Service Defination"

./check_http -H 172.217.0.238 -w 60 -c 70 -t 60

Solution

  • What about something like this:

    define service{
            use                             xyzserver        
            host_name                       backup.xyz.com
            service_description             http
            check_command                   check_http!'-H 172.217.0.238 -w 60 -c 70 -t 60'
            }