1 # +------------------------------------------------------------------+
2 # | ____ _ _ __ __ _ __ |
3 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
4 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
5 # | | |___| | | | __/ (__| < | | | | . \ |
6 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
8 # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
9 # +------------------------------------------------------------------+
11 # This file is part of Check_MK.
12 # The official homepage is at http://mathias-kettner.de/check_mk.
14 # check_mk is free software; you can redistribute it and/or modify it
15 # under the terms of the GNU General Public License as published by
16 # the Free Software Foundation in version 2. check_mk is distributed
17 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
18 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
19 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
20 # ails. You should have received a copy of the GNU General Public
21 # License along with GNU Make; see the file COPYING. If not, write
22 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 # Boston, MA 02110-1301 USA.
25 # These file contains templates for monitoring objects. The
26 # configuration that Check_MK creates uses these templates.
27 # You *can* modify this file, but if you want to change parameters
28 # for hosts and services a better idea is using extra_host_conf
29 # and extra_service_conf.
31 # OMD users: your modifications to this file are handled
32 # by 'omd update' so no problems should arise during an
33 # update as long as your modifications to not collide
34 # with modifications due to new versions of the file. OMD
35 # will let you interactively resolve such a conflict.
37 # Non-OMD users: Usually this file is created as a symlink
38 # in nagios/etc/conf.d (or objects or whatever directory
39 # you are using) pointing to the shipped file. If you want
40 # to modify this file, then replace the symlink with a true
41 # copy of the file. Note, however, that a software update
42 # of Check_MK will not update your check_mk_templates.cfg
43 # anymore and you might get incompatible as time goes by.
45 # ------------------------------------------------------------------
48 # / ___|___ _ __ | |_ __ _ ___| |_ ___
49 # | | / _ \| '_ \| __/ _` |/ __| __/ __|
50 # | |__| (_) | | | | || (_| | (__| |_\__ \
51 # \____\___/|_| |_|\__\__,_|\___|\__|___/
54 # This contact is only needed while you have not configured contacts
55 # for your hosts and services with the variables
56 # service_contactgroups and host_contactgroups. This is, because
57 # Nagios does not allow a host or service to not have a contact.
58 # And we want this default configuration file to be complete
63 alias check_mk dummy contact
64 host_notification_commands check-mk-dummy
65 service_notification_commands check-mk-dummy
66 host_notification_options n
67 service_notification_options n
68 host_notification_period 24X7
69 service_notification_period 24X7
73 contactgroup_name check_mk
74 alias check_mk dummy contact group
80 # | | | | ___ ___| |_ ___
81 # | |_| |/ _ \/ __| __/ __|
82 # | _ | (_) \__ \ |_\__ \
83 # |_| |_|\___/|___/\__|___/
86 # Base template for all hosts that are monitored
91 notifications_enabled 1
92 event_handler_enabled 0
93 flap_detection_enabled 1
94 failure_prediction_enabled 1
95 retain_status_information 1
96 retain_nonstatus_information 1
98 check_command check-mk-host-ping
102 notification_interval 0
103 notification_period 24X7
104 notification_options d,u,r,f,s
105 contact_groups check_mk
109 # This template is used for normal hosts
115 action_url /###SITE###/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/###SITE###/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_
119 # If you use service aggregation than this template
120 # is used for your summary hosts. The notes url
121 # links to the detailed host belonging to this summary
122 # host. You might need to adopt the URL.
124 name check_mk_host-summary
127 notes_url /###SITE###/nagios/cgi-bin/status.cgi?host=$_HOST_REALNAME$
131 # Used for cluster hosts (i.e. the logical hosts, not
132 # the cluster's nodes)
134 name check_mk_cluster
136 check_command check-mk-host-ping-cluster
141 # Used for aggregation host of clusters.
143 name check_mk_cluster-summary
144 use check_mk_cluster,check_mk_host-summary
150 # / ___| ___ _ ____ _(_) ___ ___ ___
151 # \___ \ / _ \ '__\ \ / / |/ __/ _ \/ __|
152 # ___) | __/ | \ V /| | (_| __/\__ \
153 # |____/ \___|_| \_/ |_|\___\___||___/
156 # Template used by all other check_mk templates
158 name check_mk_default
160 active_checks_enabled 1
161 passive_checks_enabled 1
163 obsess_over_service 1
165 notifications_enabled 1
166 event_handler_enabled 0
167 flap_detection_enabled 1
168 failure_prediction_enabled 1
170 retain_status_information 1
171 retain_nonstatus_information 1
172 notification_interval 0
174 normal_check_interval 1
175 retry_check_interval 1
177 notification_options u,c,w,r,f,s
178 notification_period 24X7
182 # Sub-Template used for checks using performance data
187 action_url /###SITE###/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/###SITE###/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
190 # This template is used by the service that actively
191 # calls check_mk. Each host has exactly one service
192 # using this template. Here you can configure, how often
193 # each host should be checked.
196 use check_mk_perf,check_mk_default
198 check_command check-mk
199 active_checks_enabled 1
202 # This template is used for inventory checks. They
203 # are generated if you set inventory_check_interval
204 # to a number > 0 in main.mk
206 name check_mk_inventory
209 check_command check-mk-inventory
210 active_checks_enabled 1
214 # Check_mk knows, which checks have performance data
215 # and assigns this template to these. You might need
216 # to adapt the action_url.
218 name check_mk_passive_perf
219 use check_mk_perf,check_mk_default
221 active_checks_enabled 0
224 # This is used for checks without performance data.
226 name check_mk_passive
229 active_checks_enabled 0
232 # This template is used for aggregated services (on the
233 # summary hosts). The never have performance data. A
234 # check command must be defined - even if never called.
235 # Notifications for aggregated services are disabled.
236 # Otherwise you would get them twice.
238 name check_mk_summarized
240 check_command check-mk-dummy ; never called
242 notifications_enabled 0
246 # Hosts with no configured or autodetected service will
247 # get one service that is derived from the following
248 # template. This is needed, because Nagios does not
249 # allow a host without any service.
251 name check_mk_pingonly
254 check_command check-mk-ping
255 service_description PING
257 active_checks_enabled 1
262 # / ___| ___ _ ____ _(_) ___ ___ __| | ___ _ __ ___
263 # \___ \ / _ \ '__\ \ / / |/ __/ _ \ / _` |/ _ \ '_ \/ __|
264 # ___) | __/ | \ V /| | (_| __/ | (_| | __/ |_) \__ \
265 # |____/ \___|_| \_/ |_|\___\___| \__,_|\___| .__/|___/
268 # This template is used by service dependencies created via
269 # the configuration variable service_dependencies. Since we
270 # only deal with passive checks the dependencies are not
271 # used to suppress service checks. But they are very useful
272 # for suppressing notifications. If you set inherits_parent
273 # to 1, then if A depends on B and B depends on C, A will
274 # automatically depend on C. This is usually what you want.
275 # If A depends on B and B is in WARNING state, the notification
276 # will *not* be suppressed. Check_mk generally uses WARNING state
277 # if the service is still working.
278 define servicedependency {
281 notification_failure_criteria u,c ; do not suppress in case of WARNING
287 # / ___|___ _ __ ___ _ __ ___ __ _ _ __ __| |___
288 # | | / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __|
289 # | |__| (_) | | | | | | | | | | | (_| | | | | (_| \__ \
290 # \____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/
294 # Calling check_mk with precompiled checks
296 command_name check-mk
297 command_line python $USER4$/var/check_mk/precompiled/"$HOSTNAME$"
300 # Use this variant of if you are working without precompiled
301 # checks (which is not recommended):
303 # command_name check-mk
304 # command_line check_mk $HOSTNAME$ $HOSTADDRESS$
309 command_name check-mk-inventory
310 command_line check_mk --cache --check-inventory "$HOSTNAME$"
314 command_name check-mk-dummy
315 command_line echo "DUMMY - Always OK"
318 # Commands for services of PING-only hosts
320 command_name check-mk-ping
321 command_line $USER4$/lib/nagios/plugins/check_icmp $ARG1$ $HOSTADDRESS$
325 command_name check-mk-ping-cluster
326 command_line $USER4$/lib/nagios/plugins/check_icmp -m 1 $ARG1$ $_HOSTNODEIPS$
329 # Host check commands
331 command_name check-mk-host-ping
332 command_line $USER4$/lib/nagios/plugins/check_icmp $ARG1$ $HOSTADDRESS$
336 command_name check-mk-host-ping-cluster
337 command_line $USER4$/lib/nagios/plugins/check_icmp -m 1 $ARG1$ $_HOSTNODEIPS$
341 command_name check-mk-host-ok
342 command_line echo "OK - Host is always assumed to be up"
346 command_name check-mk-host-tcp
347 command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
351 # General notification script. Details can be configured
352 # in main.mk via notification_... options
354 command_name check-mk-notify
356 NOTIFY_CONTACTNAME='$CONTACTNAME$' \
357 NOTIFY_CONTACTEMAIL='$CONTACTEMAIL$' \
358 NOTIFY_CONTACTPAGER='$CONTACTPAGER$' \
359 NOTIFY_NOTIFICATIONTYPE='$NOTIFICATIONTYPE$' \
360 NOTIFY_HOSTNOTIFICATIONNUMBER='$HOSTNOTIFICATIONNUMBER$' \
361 NOTIFY_SERVICENOTIFICATIONNUMBER='$SERVICENOTIFICATIONNUMBER$' \
362 NOTIFY_HOSTPROBLEMID='$HOSTPROBLEMID$' \
363 NOTIFY_SERVICEPROBLEMID='$SERVICEPROBLEMID$' \
364 NOTIFY_HOSTNAME='$HOSTNAME$' \
365 NOTIFY_HOSTALIAS='$HOSTALIAS$' \
366 NOTIFY_HOSTADDRESS='$HOSTADDRESS$' \
367 NOTIFY_HOSTATTEMPT='$HOSTATTEMPT$' \
368 NOTIFY_LASTHOSTSTATE='$LASTHOSTSTATE$' \
369 NOTIFY_LASTHOSTSTATEID='$LASTHOSTSTATEID$' \
370 NOTIFY_LASTHOSTSTATECHANGE='$LASTHOSTSTATECHANGE$' \
371 NOTIFY_LASTHOSTUP='$LASTHOSTUP$' \
372 NOTIFY_HOSTSTATE='$HOSTSTATE$' \
373 NOTIFY_HOSTSTATEID='$HOSTSTATEID$' \
374 NOTIFY_HOSTCHECKCOMMAND="$HOSTCHECKCOMMAND$" \
375 NOTIFY_HOSTOUTPUT='$HOSTOUTPUT$' \
376 NOTIFY_HOSTPERFDATA='$HOSTPERFDATA$' \
377 NOTIFY_LONGHOSTOUTPUT='$LONGHOSTOUTPUT$' \
378 NOTIFY_SERVICEDESC='$SERVICEDESC$' \
379 NOTIFY_LASTSERVICESTATE='$LASTSERVICESTATE$' \
380 NOTIFY_LASTSERVICESTATEID='$LASTSERVICESTATEID$' \
381 NOTIFY_LASTSERVICESTATECHANGE='$LASTSERVICESTATECHANGE$' \
382 NOTIFY_LASTSERVICEOK='$LASTSERVICEOK$' \
383 NOTIFY_SERVICEATTEMPT='$SERVICEATTEMPT$' \
384 NOTIFY_SERVICESTATE='$SERVICESTATE$' \
385 NOTIFY_SERVICESTATEID='$SERVICESTATEID$' \
386 NOTIFY_SERVICEOUTPUT='$SERVICEOUTPUT$' \
387 NOTIFY_LONGSERVICEOUTPUT='$LONGSERVICEOUTPUT$' \
388 NOTIFY_SERVICEPERFDATA='$SERVICEPERFDATA$' \
389 NOTIFY_SERVICECHECKCOMMAND="$SERVICECHECKCOMMAND$" \
390 NOTIFY_DATE='$DATE$' \
391 NOTIFY_SHORTDATETIME='$SHORTDATETIME$' \
392 NOTIFY_LONGDATETIME='$LONGDATETIME$' \
393 NOTIFY_HOSTDOWNTIME='$HOSTDOWNTIME$' \
394 NOTIFY_NOTIFICATIONCOMMENT='$NOTIFICATIONCOMMENT$' \
395 NOTIFY_NOTIFICATIONAUTHOR='$NOTIFICATIONAUTHOR$' \
396 NOTIFY_NOTIFICATIONAUTHORNAME='$NOTIFICATIONAUTHORNAME$' \
397 NOTIFY_NOTIFICATIONAUTHORALIAS='$NOTIFICATIONAUTHORALIAS$' \
398 NOTIFY_SERVICEACKAUTHOR='$SERVICEACKAUTHOR$' \
399 NOTIFY_SERVICEACKCOMMENT='$SERVICEACKCOMMENT$' \
400 NOTIFY_SERVICEGROUPNAMES='$SERVICEGROUPNAMES$' \
401 NOTIFY_HOSTACKAUTHOR='$HOSTACKAUTHOR$' \
402 NOTIFY_HOSTACKCOMMENT='$HOSTACKCOMMENT$' \
403 NOTIFY_HOSTGROUPNAMES='$HOSTGROUPNAMES$' \
404 NOTIFY_HOSTTAGS='$_HOSTTAGS$' \
405 NOTIFY_HOST_SL='$_HOSTEC_SL$' \
406 NOTIFY_SVC_SL='$_SERVICEEC_SL$' \
407 NOTIFY_SERVICE_SL='$_SERVICEEC_SL$' \
408 NOTIFY_HOST_EC_CONTACT='$_HOSTEC_CONTACT$' \
409 NOTIFY_SERVICE_EC_CONTACT='$_SERVICEEC_CONTACT$' \
415 # |_ _(_)_ __ ___ ___ _ __ ___ _ __(_) ___ __| |___
416 # | | | | '_ ` _ \ / _ \ '_ \ / _ \ '__| |/ _ \ / _` / __|
417 # | | | | | | | | | __/ |_) | __/ | | | (_) | (_| \__ \
418 # |_| |_|_| |_| |_|\___| .__/ \___|_| |_|\___/ \__,_|___/
422 # Make sure, timeperiod used in default template is available
426 alias Dummy time period for check_mk
430 wednesday 00:00-24:00