LoginSignup
0
0

More than 5 years have passed since last update.

nagiosのpassive checkとfreshness checkの組み合わせ

Posted at

Nagiosでポーリングではなく外部トリガによるステータス変更をするにはpassive checkを使う。トリガによって異常状態にするだけならpassivce checkだけでよいが、トリガが来ている間は正常、来なくなったら異常状態、にするにはfreshness checkを組み合わせる。

nagios.cfg
accept_passive_service_checks=1
check_service_freshness=1
service_freshness_check_interval=60
service.cfg
define service{
       host                    hostname
       service_description     sample_service
       active_checks_enabled   0
       passive_checks_enabled  1
       check_freshness         1
       freshness_threshold     600
       check_command           send_alert!message
}
commands.cfg
define command {
        command_name send_alert
        command_line $USER1$/check_dummy 2 $ARG1$
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0