# # Nagios 2.6 Konfigurationsdatei # # erstellt am 10.08.2007 # Stefan Bauer # Josef-Fuehrer-Str. 30 # 80997 Muenchen # stefan.bauer@plzk.de # ## ### -> Zeitperioden <- ### ## # # 24x7 Rund-um-die-Uhr-Bereitschaft define timeperiod{ timeperiod_name 24x7 alias 24 Hours A Day, 7 Days A Week sunday 00:00-24:00 monday 00:00-24:00 tuesday 00:00-24:00 wednesday 00:00-24:00 thursday 00:00-24:00 friday 00:00-24:00 saturday 00:00-24:00 } # 8x5 Bereitschaft fuer normale Arbeitszeit define timeperiod{ timeperiod_name workhours alias "Normal" Working Hours monday 09:00-17:00 tuesday 09:00-17:00 wednesday 09:00-17:00 thursday 09:00-17:00 friday 09:00-17:00 } # Wochenend-Bereitschaft + Nachtschicht define timeperiod{ timeperiod_name nonworkhours alias Non-Work Hours sunday 00:00-24:00 monday 00:00-09:00,17:00-24:00 tuesday 00:00-09:00,17:00-24:00 wednesday 00:00-09:00,17:00-24:00 thursday 00:00-09:00,17:00-24:00 friday 00:00-09:00,17:00-24:00 saturday 00:00-24:00 } # Keine Bereitschaft / Urlaub define timeperiod{ timeperiod_name none alias No Time Is A Good Time } # ## ### -> Befehle fuer Ueberpruefungen <- ### ### -> meist in commands.cfg hinterlegt <- ### ## # # ## ### -> Alarmierungskontakte <- ### ### -> Wer wird wann kontaktiert <- ### ## # # Der Haupt-Admin, welcher immer alarmiert wird # und sich immer um alles kuemmer define contact{ contact_name Haupt-Administrator alias Stefan Bauer service_notification_period 24x7 host_notification_period 24x7 service_notification_options w,u,c,r host_notification_options d,r service_notification_commands notify-by-email host_notification_commands host-notify-by-email email sb@localhost } # ## ### -> Alarmierungsgruppen <- ### ### -> Am WE nur die Azubis z.B. ;) <- ### ## # define contactgroup{ contactgroup_name admins alias Nagios Administrators members Haupt-Administrator } # ## ### -> Die zu ueberwachenden Maschinen <- ### ## # # Wir definieren die default-Optionen für unsere Hosts define host{ name linux-server # use generic-host check_period 24x7 max_check_attempts 10 check_command check-host-alive notification_period workhours notification_interval 120 notification_options d,u,r contact_groups admins register 0 } # Ueberwachung von Host #1 -> localhost define host{ use linux-server host_name localhost alias localhost address 127.0.0.1 } # Ueberwachung von Host #2 -> Industrieservice Router define host{ use linux-server host_name indu.ath.cx alias indu-router address indu.ath.cx } # ## ### -> Maschinengruppen, welche zur Verwaltung <- ### ### -> zusammengefasst werden koennen <- ### ## # define hostgroup{ hostgroup_name lokaler Server alias Nagios Server members localhost } # ## ### -> Die zu ueberwachenden Dienste <- ### ### -> z.B. erreichbar per Ping, HTTP, SMTP, Telnet usw. <- ### ## # # Default settings fuer alle zukuenftigen Services define service{ name generic-service active_checks_enabled 1 passive_checks_enabled 1 parallelize_check 1 obsess_over_service 1 check_freshness 0 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 is_volatile 0 register 0 } define service{ name local-service use generic-service check_period 24x7 max_check_attempts 4 normal_check_interval 5 retry_check_interval 1 contact_groups admins notification_options w,u,c,r notification_interval 60 notification_period 24x7 register 0 } # Wir definieren die Pruefung, localhost auf Erreichbarkeit # via icmp (ping) zu testen define service{ use local-service host_name localhost,indu.ath.cx service_description PING check_command check_ping!100.0,20%!500.0,60% } define service{ use local-service host_name localhost service_description Root Partition check_command check_disk!20%!10%!/ }