source: nagios/objects/templates.cfg@ 346

Last change on this file since 346 was 303, checked in by Rick van der Zwet, 14 years ago

New checks and better host definitions.

File size: 10.9 KB
RevLine 
[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
28define 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
52define 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
[303]65 check_command check-host-alive ; Default command to check FreeBSD hosts
[202]66 register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
[262]67 action_url /pnp4nagios/graph?host=$HOSTNAME$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$
[202]68 }
69
70
71define host {
72 use generic-host
73 max_check_attempts 10
74 host_name fritz.box
[303]75 address 192.168.178.1
[202]76}
77
78# Little hack to avoid spamming in case DSL Line is down
79define host {
80 use generic-host
81 max_check_attempts 10
82 host_name ns.xs4all.nl
83 parents fritz.box
84}
85
[303]86
87# freebsd host definition template - this is not a real host, just a template!
[202]88define host{
[303]89 name freebsd-server ; the name of this host template
90 parents ns.xs4all.nl ; HACK to avoid spams
[202]91 use generic-host ; This template inherits other values from the generic-host template
92 check_period 24x7 ; By default, FreeBSD hosts are checked round the clock
93 check_interval 5 ; Actively check the host every 5 minutes
94 retry_interval 1 ; Schedule host check retries at 1 minute intervals
95 max_check_attempts 10 ; Check each FreeBSD host 10 times (max)
96 register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
97 }
98
99
100# Windows host definition template - This is NOT a real host, just a template!
101
102define host{
103 name windows-server ; The name of this host template
104 use generic-host ; Inherit default values from the generic-host template
105 check_period 24x7 ; By default, Windows servers are monitored round the clock
106 check_interval 5 ; Actively check the server every 5 minutes
107 retry_interval 1 ; Schedule host check retries at 1 minute intervals
108 max_check_attempts 10 ; Check each server 10 times (max)
109 check_command check-host-alive ; Default command to check if servers are "alive"
110 notification_period 24x7 ; Send notification out at any time - day or night
111 notification_interval 30 ; Resend notifications every 30 minutes
112 notification_options d,r ; Only send notifications for specific host states
113 contact_groups admins ; Notifications get sent to the admins by default
114 hostgroups windows-servers ; Host groups that Windows servers should be a member of
115 register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
116 }
117
118
119# We define a generic printer template that can be used for most printers we monitor
120
121define host{
122 name generic-printer ; The name of this host template
123 use generic-host ; Inherit default values from the generic-host template
124 check_period 24x7 ; By default, printers are monitored round the clock
125 check_interval 5 ; Actively check the printer every 5 minutes
126 retry_interval 1 ; Schedule host check retries at 1 minute intervals
127 max_check_attempts 10 ; Check each printer 10 times (max)
128 check_command check-host-alive ; Default command to check if printers are "alive"
129 notification_period workhours ; Printers are only used during the workday
130 notification_interval 30 ; Resend notifications every 30 minutes
131 notification_options d,r ; Only send notifications for specific host states
132 contact_groups admins ; Notifications get sent to the admins by default
133 register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
134 }
135
136
137# Define a template for switches that we can reuse
138define host{
139 name generic-switch ; The name of this host template
140 use generic-host ; Inherit default values from the generic-host template
141 check_period 24x7 ; By default, switches are monitored round the clock
142 check_interval 5 ; Switches are checked every 5 minutes
143 retry_interval 1 ; Schedule host check retries at 1 minute intervals
144 max_check_attempts 10 ; Check each switch 10 times (max)
145 check_command check-host-alive ; Default command to check if routers are "alive"
146 notification_period 24x7 ; Send notifications at any time
147 notification_interval 30 ; Resend notifications every 30 minutes
148 notification_options d,r ; Only send notifications for specific host states
149 contact_groups admins ; Notifications get sent to the admins by default
150 register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
151 }
152
153
154
155
156###############################################################################
157###############################################################################
158#
159# SERVICE TEMPLATES
160#
161###############################################################################
162###############################################################################
163
164# Generic service definition template - This is NOT a real service, just a template!
165
166define service{
167 name generic-service ; The 'name' of this service template
168 active_checks_enabled 1 ; Active service checks are enabled
169 passive_checks_enabled 1 ; Passive service checks are enabled/accepted
170 parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
171 obsess_over_service 1 ; We should obsess over this service (if necessary)
172 check_freshness 0 ; Default is to NOT check service 'freshness'
173 notifications_enabled 1 ; Service notifications are enabled
174 event_handler_enabled 1 ; Service event handler is enabled
175 flap_detection_enabled 1 ; Flap detection is enabled
176 failure_prediction_enabled 1 ; Failure prediction is enabled
177 process_perf_data 1 ; Process performance data
178 retain_status_information 1 ; Retain status information across program restarts
179 retain_nonstatus_information 1 ; Retain non-status information across program restarts
180 is_volatile 0 ; The service is not volatile
181 check_period 24x7 ; The service can be checked at any time of the day
182 max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
183 normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
184 retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
185 contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
186 notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
187 notification_interval 60 ; Re-notify about service problems every hour
188 notification_period 24x7 ; Notifications can be sent out at any time
[262]189 action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
[202]190 register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
191 }
192
193
194# Local service definition template - This is NOT a real service, just a template!
195
196define service{
197 name local-service ; The name of this service template
198 use generic-service ; Inherit default values from the generic-service definition
199 max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
200 normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
201 retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined
202 register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
203 }
204
Note: See TracBrowser for help on using the repository browser.