5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

nagiosの監視間隔は(初期値)5分なので1分に修正すること

Last updated at Posted at 2015-09-19

参考

通常のチェック間隔(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回に修正した。

5
5
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
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?