Hallo zusammen,
ich bin gerade dabei Nagios einzuführen. Ich habe viel im Inrternet gelesen, bin aber leider auch etwas durch die ganzen verschiedenen Konfigurationen verwirrt und habe daher ein paar Fragen bezüglich der Intervalle.
Testweise lasse ich mal unsere AccessPoints per Nagios überwachen. Hier die entsprechende wlan10.cfg
Mit der oben gezeigten Konfiguration funktioniert alles. Doch Frage ich mich, inwiefern ich alles richtig eingestellt habe.Code:# HOST # define host{ name WLAN10.bix.local ; The name of this host template notifications_enabled 1 ; Host notifications are enabled event_handler_enabled 1 ; Host event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled failure_prediction_enabled 1 ; Failure prediction is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! } define host{ use WLAN10.bix.local ; Name of host template to use host_name wlan10.bix.local alias wlan10.bix.local address 169.254.100.10 check_command check-host-alive contact_groups admins max_check_attempts 5 notification_interval 120 notification_period 24x7 notification_options d,r } # SERVICE # define service{ name WLAN10.bix.local ; The 'name' of this service template active_checks_enabled 1 ; Active service checks are enabled passive_checks_enabled 1 ; Passive service checks are enabled/accepted parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems) obsess_over_service 1 ; We should obsess over this service (if necessary) check_freshness 0 ; Default is to NOT check service 'freshness' notifications_enabled 1 ; Service notifications are enabled event_handler_enabled 1 ; Service event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled failure_prediction_enabled 1 ; Failure prediction is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! } define service{ use WLAN10.bix.local ; Name of service template to use host_name wlan10.bix.local service_description PING is_volatile 0 check_period 24x7 max_check_attempts 5 normal_check_interval 10 retry_check_interval 1 contact_groups admins notification_options w,u,c,r notification_interval 120 notification_period 24x7 check_command check_ping!100.0,20%!500.0,60% }
Ich möchte:
- alle 10 Minuten prüfen, ob ein Ping funktioniert (normal_check_interval)
- nach 5 missglückten Pings (max_check_attempts) eine Nachrticht versendet haben
- die Zeit zwischen den missglückten Versuchen soll eine Minute betragen (retry_check_interval)
- dann alle 2h eine weitere Nachricht versenden (notification_interval).
Nun noch meine Fragen:
Er versendet ja nun nach 5min die Nachricht - in welchem Intervall prüft er dann weiter, ob der Service wieder verfügbar ist? Jede Minute - bis er wieder Online ist und dann bekomme ich eine recovery-Nachricht?
Nun habe ich ja noch mehrere AccessPoints. Wie mus sich sinnvoll vorgehen, um möglichst wenig konfigurieren zu müssen? Momentan habe ich die ganze Konfigurationsdatei kopiert und einfach WLAN10 durch WLAN11 ersetzt - das geht doch aber sicher besser...Ebenso kann ich doch auch sicherlich einige doppelten Einträge herausnehmen...was ist sinnvoll?
Falls ihr noch Infos aus der nagios.cgf braucht einfach sagen - die ist zu groß zum Posten.
Ich hoffe ihr bringt noch etwas Licht ins Dunkel,
Grüße Johannes
Lesezeichen