[202] | 1 | ###############################################################################
|
---|
| 2 | # TEMPLATES.CFG - SAMPLE OBJECT TEMPLATES
|
---|
| 3 | #
|
---|
| 4 | # Last Modified: 10-03-2007
|
---|
| 5 | #
|
---|
| 6 | # NOTES: This config file provides you with some example object definition
|
---|
| 7 | # templates that are refered by other host, service, contact, etc.
|
---|
| 8 | # definitions in other config files.
|
---|
| 9 | #
|
---|
| 10 | # You don't need to keep these definitions in a separate file from your
|
---|
| 11 | # other object definitions. This has been done just to make things
|
---|
| 12 | # easier to understand.
|
---|
| 13 | #
|
---|
| 14 | ###############################################################################
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 |
|
---|
| 18 | ###############################################################################
|
---|
| 19 | ###############################################################################
|
---|
| 20 | #
|
---|
| 21 | # CONTACT TEMPLATES
|
---|
| 22 | #
|
---|
| 23 | ###############################################################################
|
---|
| 24 | ###############################################################################
|
---|
| 25 |
|
---|
| 26 | # Generic contact definition template - This is NOT a real contact, just a template!
|
---|
| 27 |
|
---|
| 28 | define contact{
|
---|
| 29 | name generic-contact ; The name of this contact template
|
---|
| 30 | service_notification_period 24x7 ; service notifications can be sent anytime
|
---|
| 31 | host_notification_period 24x7 ; host notifications can be sent anytime
|
---|
| 32 | service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
|
---|
| 33 | host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
|
---|
| 34 | service_notification_commands notify-service-by-email ; send service notifications via email
|
---|
| 35 | host_notification_commands notify-host-by-email ; send host notifications via email
|
---|
| 36 | register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 |
|
---|
| 42 | ###############################################################################
|
---|
| 43 | ###############################################################################
|
---|
| 44 | #
|
---|
| 45 | # HOST TEMPLATES
|
---|
| 46 | #
|
---|
| 47 | ###############################################################################
|
---|
| 48 | ###############################################################################
|
---|
| 49 |
|
---|
| 50 | # Generic host definition template - This is NOT a real host, just a template!
|
---|
| 51 |
|
---|
| 52 | define host{
|
---|
| 53 | name generic-host ; The name of this host template
|
---|
| 54 | notifications_enabled 1 ; Host notifications are enabled
|
---|
| 55 | event_handler_enabled 1 ; Host event handler is enabled
|
---|
| 56 | flap_detection_enabled 1 ; Flap detection is enabled
|
---|
| 57 | failure_prediction_enabled 1 ; Failure prediction is enabled
|
---|
| 58 | process_perf_data 1 ; Process performance data
|
---|
| 59 | retain_status_information 1 ; Retain status information across program restarts
|
---|
| 60 | retain_nonstatus_information 1 ; Retain non-status information across program restarts
|
---|
| 61 | notification_period 24x7 ; Send host notifications at any time
|
---|
| 62 | notification_interval 120 ; Resend notifications every 2 hours
|
---|
| 63 | notification_options d,u,r ; Only send notifications for specific host states
|
---|
| 64 | contact_groups admins ; Notifications get sent to the admins by default
|
---|
| 65 | register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
|
---|
| 66 | action_url /nagios/pnp/index.php?host=$HOSTNAME$' onmouseover="get_g('$HOSTNAME$','_HOST_')" onmouseout='clear_g()
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 |
|
---|
| 70 | define host {
|
---|
| 71 | use generic-host
|
---|
| 72 | max_check_attempts 10
|
---|
| 73 | host_name fritz.box
|
---|
| 74 | }
|
---|
| 75 |
|
---|
| 76 | # Little hack to avoid spamming in case DSL Line is down
|
---|
| 77 | define host {
|
---|
| 78 | use generic-host
|
---|
| 79 | max_check_attempts 10
|
---|
| 80 | host_name ns.xs4all.nl
|
---|
| 81 | parents fritz.box
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 | # FreeBSD host definition template - This is NOT a real host, just a template!
|
---|
| 85 | define host{
|
---|
| 86 | name freebsd-server ; The name of this host template
|
---|
| 87 | parents ns.xs4all.nl
|
---|
| 88 | use generic-host ; This template inherits other values from the generic-host template
|
---|
| 89 | check_period 24x7 ; By default, FreeBSD hosts are checked round the clock
|
---|
| 90 | check_interval 5 ; Actively check the host every 5 minutes
|
---|
| 91 | retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
---|
| 92 | max_check_attempts 10 ; Check each FreeBSD host 10 times (max)
|
---|
| 93 | check_command check-host-alive ; Default command to check FreeBSD hosts
|
---|
| 94 | register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
|
---|
| 95 | }
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | # Windows host definition template - This is NOT a real host, just a template!
|
---|
| 100 |
|
---|
| 101 | define host{
|
---|
| 102 | name windows-server ; The name of this host template
|
---|
| 103 | use generic-host ; Inherit default values from the generic-host template
|
---|
| 104 | check_period 24x7 ; By default, Windows servers are monitored round the clock
|
---|
| 105 | check_interval 5 ; Actively check the server every 5 minutes
|
---|
| 106 | retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
---|
| 107 | max_check_attempts 10 ; Check each server 10 times (max)
|
---|
| 108 | check_command check-host-alive ; Default command to check if servers are "alive"
|
---|
| 109 | notification_period 24x7 ; Send notification out at any time - day or night
|
---|
| 110 | notification_interval 30 ; Resend notifications every 30 minutes
|
---|
| 111 | notification_options d,r ; Only send notifications for specific host states
|
---|
| 112 | contact_groups admins ; Notifications get sent to the admins by default
|
---|
| 113 | hostgroups windows-servers ; Host groups that Windows servers should be a member of
|
---|
| 114 | register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
---|
| 115 | }
|
---|
| 116 |
|
---|
| 117 |
|
---|
| 118 | # We define a generic printer template that can be used for most printers we monitor
|
---|
| 119 |
|
---|
| 120 | define host{
|
---|
| 121 | name generic-printer ; The name of this host template
|
---|
| 122 | use generic-host ; Inherit default values from the generic-host template
|
---|
| 123 | check_period 24x7 ; By default, printers are monitored round the clock
|
---|
| 124 | check_interval 5 ; Actively check the printer every 5 minutes
|
---|
| 125 | retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
---|
| 126 | max_check_attempts 10 ; Check each printer 10 times (max)
|
---|
| 127 | check_command check-host-alive ; Default command to check if printers are "alive"
|
---|
| 128 | notification_period workhours ; Printers are only used during the workday
|
---|
| 129 | notification_interval 30 ; Resend notifications every 30 minutes
|
---|
| 130 | notification_options d,r ; Only send notifications for specific host states
|
---|
| 131 | contact_groups admins ; Notifications get sent to the admins by default
|
---|
| 132 | register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
---|
| 133 | }
|
---|
| 134 |
|
---|
| 135 |
|
---|
| 136 | # Define a template for switches that we can reuse
|
---|
| 137 | define host{
|
---|
| 138 | name generic-switch ; The name of this host template
|
---|
| 139 | use generic-host ; Inherit default values from the generic-host template
|
---|
| 140 | check_period 24x7 ; By default, switches are monitored round the clock
|
---|
| 141 | check_interval 5 ; Switches are checked every 5 minutes
|
---|
| 142 | retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
---|
| 143 | max_check_attempts 10 ; Check each switch 10 times (max)
|
---|
| 144 | check_command check-host-alive ; Default command to check if routers are "alive"
|
---|
| 145 | notification_period 24x7 ; Send notifications at any time
|
---|
| 146 | notification_interval 30 ; Resend notifications every 30 minutes
|
---|
| 147 | notification_options d,r ; Only send notifications for specific host states
|
---|
| 148 | contact_groups admins ; Notifications get sent to the admins by default
|
---|
| 149 | register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
---|
| 150 | }
|
---|
| 151 |
|
---|
| 152 |
|
---|
| 153 |
|
---|
| 154 |
|
---|
| 155 | ###############################################################################
|
---|
| 156 | ###############################################################################
|
---|
| 157 | #
|
---|
| 158 | # SERVICE TEMPLATES
|
---|
| 159 | #
|
---|
| 160 | ###############################################################################
|
---|
| 161 | ###############################################################################
|
---|
| 162 |
|
---|
| 163 | # Generic service definition template - This is NOT a real service, just a template!
|
---|
| 164 |
|
---|
| 165 | define service{
|
---|
| 166 | name generic-service ; The 'name' of this service template
|
---|
| 167 | active_checks_enabled 1 ; Active service checks are enabled
|
---|
| 168 | passive_checks_enabled 1 ; Passive service checks are enabled/accepted
|
---|
| 169 | parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
|
---|
| 170 | obsess_over_service 1 ; We should obsess over this service (if necessary)
|
---|
| 171 | check_freshness 0 ; Default is to NOT check service 'freshness'
|
---|
| 172 | notifications_enabled 1 ; Service notifications are enabled
|
---|
| 173 | event_handler_enabled 1 ; Service event handler is enabled
|
---|
| 174 | flap_detection_enabled 1 ; Flap detection is enabled
|
---|
| 175 | failure_prediction_enabled 1 ; Failure prediction is enabled
|
---|
| 176 | process_perf_data 1 ; Process performance data
|
---|
| 177 | retain_status_information 1 ; Retain status information across program restarts
|
---|
| 178 | retain_nonstatus_information 1 ; Retain non-status information across program restarts
|
---|
| 179 | is_volatile 0 ; The service is not volatile
|
---|
| 180 | check_period 24x7 ; The service can be checked at any time of the day
|
---|
| 181 | max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
|
---|
| 182 | normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
|
---|
| 183 | retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
|
---|
| 184 | contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
|
---|
| 185 | notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
|
---|
| 186 | notification_interval 60 ; Re-notify about service problems every hour
|
---|
| 187 | notification_period 24x7 ; Notifications can be sent out at any time
|
---|
| 188 | action_url /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$' onmouseover="get_g('$HOSTNAME$','$SERVICEDESC$')" onmouseout='clear_g()
|
---|
| 189 | register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
|
---|
| 190 | }
|
---|
| 191 |
|
---|
| 192 |
|
---|
| 193 | # Local service definition template - This is NOT a real service, just a template!
|
---|
| 194 |
|
---|
| 195 | define service{
|
---|
| 196 | name local-service ; The name of this service template
|
---|
| 197 | use generic-service ; Inherit default values from the generic-service definition
|
---|
| 198 | max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
|
---|
| 199 | normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
|
---|
| 200 | retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined
|
---|
| 201 | register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
|
---|
| 202 | }
|
---|
| 203 |
|
---|