| 1 | define timeperiod{ | 
|---|
| 2 | timeperiod_name 24x7 | 
|---|
| 3 | alias           24 Hours A Day, 7 Days A Week | 
|---|
| 4 | sunday          00:00-24:00 | 
|---|
| 5 | monday          00:00-24:00 | 
|---|
| 6 | tuesday         00:00-24:00 | 
|---|
| 7 | wednesday       00:00-24:00 | 
|---|
| 8 | thursday        00:00-24:00 | 
|---|
| 9 | friday          00:00-24:00 | 
|---|
| 10 | saturday        00:00-24:00 | 
|---|
| 11 | } | 
|---|
| 12 |  | 
|---|
| 13 | define timeperiod{ | 
|---|
| 14 | timeperiod_name afs | 
|---|
| 15 | alias           24 Hours A Day, 7 Days A Week, except Sunday Morning | 
|---|
| 16 | sunday          00:00-05:59,08:00-24:00 | 
|---|
| 17 | monday          00:00-24:00 | 
|---|
| 18 | tuesday         00:00-24:00 | 
|---|
| 19 | wednesday       00:00-24:00 | 
|---|
| 20 | thursday        00:00-24:00 | 
|---|
| 21 | friday          00:00-24:00 | 
|---|
| 22 | saturday        00:00-24:00 | 
|---|
| 23 | } | 
|---|
| 24 |  | 
|---|
| 25 | define timeperiod{ | 
|---|
| 26 | timeperiod_name 9x5 | 
|---|
| 27 | alias           9 Hours A Day, 5 Days A Week | 
|---|
| 28 | monday          09:00-17:00 | 
|---|
| 29 | tuesday         09:00-17:00 | 
|---|
| 30 | wednesday       09:00-17:00 | 
|---|
| 31 | thursday        09:00-17:00 | 
|---|
| 32 | friday          09:00-17:00 | 
|---|
| 33 | } | 
|---|
| 34 |  | 
|---|
| 35 | define contact{ | 
|---|
| 36 | contact_name                    nagios-admin | 
|---|
| 37 | alias                           Nagios Admin | 
|---|
| 38 | service_notification_period     24x7 | 
|---|
| 39 | host_notification_period        24x7 | 
|---|
| 40 | service_notification_options    n | 
|---|
| 41 | host_notification_options       n | 
|---|
| 42 | service_notification_commands   notify-by-email | 
|---|
| 43 | host_notification_commands      host-notify-by-email | 
|---|
| 44 | email                           nagios-admin@localhost | 
|---|
| 45 | } | 
|---|
| 46 |  | 
|---|
| 47 | define contactgroup{ | 
|---|
| 48 | contactgroup_name       admins | 
|---|
| 49 | alias                   Administrators | 
|---|
| 50 | members                 nagios-admin | 
|---|
| 51 | } | 
|---|
| 52 |  | 
|---|
| 53 | define host{ | 
|---|
| 54 | name                            generic-host    ; The name of this host template | 
|---|
| 55 | notifications_enabled           1       ; Host notifications are enabled | 
|---|
| 56 | event_handler_enabled           1       ; Host event handler is enabled | 
|---|
| 57 | flap_detection_enabled          1       ; Flap detection is enabled | 
|---|
| 58 | failure_prediction_enabled      1       ; Failure prediction is enabled | 
|---|
| 59 | process_perf_data               1       ; Process performance data | 
|---|
| 60 | retain_status_information       1       ; Retain status information across program restarts | 
|---|
| 61 | retain_nonstatus_information    1       ; Retain non-status information across program restarts | 
|---|
| 62 | register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! | 
|---|
| 63 | } | 
|---|
| 64 |  | 
|---|
| 65 | define host { | 
|---|
| 66 | use                     generic-host            ; Name of host template to use | 
|---|
| 67 | host_name               localhost | 
|---|
| 68 | alias                   localhost | 
|---|
| 69 | address                 127.0.0.1 | 
|---|
| 70 | check_command           check-host-alive | 
|---|
| 71 | max_check_attempts      10 | 
|---|
| 72 | check_period            24x7 | 
|---|
| 73 | notification_interval   240 | 
|---|
| 74 | notification_period     24x7 | 
|---|
| 75 | contact_groups  admins | 
|---|
| 76 | } | 
|---|
| 77 | #        notification_options    n | 
|---|
| 78 |  | 
|---|
| 79 | define hostgroup { | 
|---|
| 80 | hostgroup_name  all | 
|---|
| 81 | alias   All Servers | 
|---|
| 82 | members * | 
|---|
| 83 | } | 
|---|
| 84 |  | 
|---|
| 85 | define service{ | 
|---|
| 86 | name                            generic-service ; The 'name' of this service template | 
|---|
| 87 | active_checks_enabled           1       ; Active service checks are enabled | 
|---|
| 88 | passive_checks_enabled          1       ; Passive service checks are enabled/accepted | 
|---|
| 89 | parallelize_check               1       ; Active service checks should be parallelized (disabling this can lead to major performance problems) | 
|---|
| 90 | obsess_over_service             1       ; We should obsess over this service (if necessary) | 
|---|
| 91 | check_freshness                 0       ; Default is to NOT check service 'freshness' | 
|---|
| 92 | notifications_enabled           1       ; Service notifications are enabled | 
|---|
| 93 | event_handler_enabled           1       ; Service event handler is enabled | 
|---|
| 94 | flap_detection_enabled          1       ; Flap detection is enabled | 
|---|
| 95 | failure_prediction_enabled      1       ; Failure prediction is enabled | 
|---|
| 96 | process_perf_data               1       ; Process performance data | 
|---|
| 97 | retain_status_information       1       ; Retain status information across program restarts | 
|---|
| 98 | retain_nonstatus_information    1       ; Retain non-status information across program restarts | 
|---|
| 99 | register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! | 
|---|
| 100 | check_period                    24x7 | 
|---|
| 101 | max_check_attempts              4 | 
|---|
| 102 | normal_check_interval           5 | 
|---|
| 103 | retry_check_interval            1 | 
|---|
| 104 | contact_groups                  admins | 
|---|
| 105 | notification_interval           1920 | 
|---|
| 106 | notification_period             24x7 | 
|---|
| 107 | is_volatile                     0 | 
|---|
| 108 | } | 
|---|
| 109 | #       notification_options            n | 
|---|
| 110 |  | 
|---|
| 111 | define service { | 
|---|
| 112 | use                             generic-service | 
|---|
| 113 | host_name                       localhost | 
|---|
| 114 | service_description             PING | 
|---|
| 115 | check_command                   check_ping!100.0,20%!500.0,60% | 
|---|
| 116 | } | 
|---|
| 117 |  | 
|---|
| 118 | define service { | 
|---|
| 119 | use                             generic-service | 
|---|
| 120 | host_name                       localhost | 
|---|
| 121 | service_description             DISK: / | 
|---|
| 122 | check_command                   check_local_disk!20%!10%!/ | 
|---|
| 123 | } | 
|---|
| 124 |  | 
|---|
| 125 | define service { | 
|---|
| 126 | use                             generic-service | 
|---|
| 127 | host_name                       localhost | 
|---|
| 128 | service_description             USERS | 
|---|
| 129 | check_command                   check_local_users!20!50 | 
|---|
| 130 | } | 
|---|
| 131 |  | 
|---|
| 132 | define service{ | 
|---|
| 133 | use                             generic-service | 
|---|
| 134 | host_name                       localhost | 
|---|
| 135 | service_description             PROCS | 
|---|
| 136 | check_command                   check_local_procs!250!400 | 
|---|
| 137 | } | 
|---|
| 138 |  | 
|---|
| 139 | define service{ | 
|---|
| 140 | use                             generic-service | 
|---|
| 141 | host_name                       localhost | 
|---|
| 142 | service_description             LOAD | 
|---|
| 143 | check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0 | 
|---|
| 144 | } | 
|---|