参考
通常のチェック間隔(service)
- generic-service で定義されている normal_check_interval が5分
これだと検知が遅れるので1分にする
/etc/nagios/objects/templates.cfg
define service{
name generic-service
max_check_attempts 3
- normal_check_interval 5
+ normal_check_interval 1
retry_check_interval 2
}
なお interval_length(初期値60秒) を変更することで秒単位の監視も可能
リトライ時のチェック間隔
- generic-service で定義されている retry_check_interval が2分
これだと検知が遅れるので1分にする
/etc/nagios/objects/templates.cfg
define service{
name generic-service
max_check_attempts 3
normal_check_interval 1
- retry_check_interval 2
+ retry_check_interval 1
}
通常のチェック間隔(generic-host)
/etc/nagios3/conf.d/generic-host_nagios2.cfg
define host{
name custom-host
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
check_command check-host-alive
- max_check_attempts 10
+ max_check_attempts 1
notification_interval 60
notification_period 24x7
notification_options d,u,r
contact_groups admins
register 0
}
max_check_attempts
この値が10(初期値)だと、10回チェックの後通知となる。
1回に修正した。