【问题标题】:How to have custom warning and critical time for nagios check_http?如何为 nagios check_http 设置自定义警告和关键时间?
【发布时间】:2017-09-06 19:08:58
【问题描述】:

我当前对主机的服务定义如下所示

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

我想将 check_http 的警告和关键时间增加到 5 分钟(警告)和 10 分钟(关键)

我的 nagios 服务器上的命令定义如下所示

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

我已经直接在命令行上运行 check_http,如下所示,它按预期输出,但我不知道在“服务定义”中将参数(如警告、关键、超时和端口号)准确放置在哪里

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

【问题讨论】:

    标签: linux http nagios nagiosxi


    【解决方案1】:

    这样的事情怎么样:

    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'
            }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多