【问题标题】:How can I monitor a router with a intern ssl certificate in Nagios?如何在 Nagios 中使用实习生 ssl 证书监控路由器?
【发布时间】:2015-04-17 05:41:31
【问题描述】:

这是我目前的设置:

主机配置:

define host{

use     generic-host        ; Inherit default values from a template

host_name       A+A         ; The name we're giving to this host

alias       A+A Objektausstattung Router    ; A longer name associated with the host

address         https://87.139.203.190:444  ; IP address of the host

hostgroups      Router      ; Host groups this host is associated with

}

服务配置:

define service{

use     generic-service     ; Inherit default values from a template

host_name       A+A

service_description HTTP

check_command   check_http

}

我会从 Nagios 得到这个错误:

check_icmp:无法解析https://87.139.203.190:444

我在这里做错了什么?

【问题讨论】:

    标签: https ssl-certificate nagios network-monitoring check-mk


    【解决方案1】:

    Nagios 尝试解析为 IP 地址和端口。仅尝试 IP 地址。

    address         https://87.139.203.190  ; IP address of the host
    

    【讨论】:

      【解决方案2】:

      您的主机定义应该只为“地址”指定一个 IP 地址。 URL 不是主机的属性,而是您要执行的 HTTP 检查的属性。

      服务定义指定 check_command,该命令又在 checkcommands.cfg 文件中定义。这将准确指定要运行的命令,可能使用传递的其他参数。

      您可能希望将端口号作为参数传递,并且您将使用 HTTPS。如何执行此操作将取决于您的设置。例如,您可以在 checkcommands.cfg 中使用它:

      define command{
          command_name    check_https
          command_line    $USER1$/check_http -t 12 -H $HOSTADDRESS$ -f ok --ssl=1 -u "$ARG1$" -p "$ARG2$" -w $ARG3$ -c $ARG4$
          }
      

      然后您可以使用检查命令配置您的服务:

      check_command check_https!/!444!1!5
      

      这将检查 url http://87.139.203.190:444/,如果超过 1 秒会发出警告,如果超过 5 秒会发出严重警告。将使用 TLSv1(否则您可能会在具有 Poodle 保护的 Web 服务器上得到误报)。

      【讨论】:

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