ホーム » コンピュータ » Linux » 外部からの到達確認

外部からの到達確認

外部からの HTTPS トラブルもあり、nagios に外部から自宅サーバへの到達性チェックを追加。

自宅から nrpe で監視している さくらインターネット 上のサーバに以下の設定を追加。

((( 外部サーバ: /etc/nagios/nrpe.d/enabled.cfg )))
# -s 文字が含まれるかチェック(DDNS環境なので文字検索チェック付き)
command[check_tsaitohnet_http]=/usr/lib/nagios/plugins/check_http tsaitoh.net -s tsaitoh.net
command[check_tsaitohnet_https]=/usr/lib/nagios/plugins/check_http --ssl tsaitoh.net -s tsaitoh.net

((( 自宅 )))
define service{
        use                     local-service   ; Name of host template to use
        host_name               .....
        service_description     TSAITOH_HTTP
        check_command           check_nrpe!check_tsaitohnet_http
        check_interval          1440 ; 1day 確認頻度は低く
        retry_interval          60   ; 1h
        notification_interval   0    ;
}
# HTTPSチェックは、HTTPSトラブルが解消してから