Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lrupp
check_mk
check_mk_templates.cfg
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File check_mk_templates.cfg of Package check_mk
# +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | # | | |___| | | | __/ (__| < | | | | . \ | # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | # | | # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de | # +------------------------------------------------------------------+ # # This file is part of Check_MK. # The official homepage is at http://mathias-kettner.de/check_mk. # # check_mk is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation in version 2. check_mk is distributed # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU General Public License for more de- # tails. You should have received a copy of the GNU General Public # License along with GNU Make; see the file COPYING. If not, write # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. # These file contains templates for monitoring objects. The # configuration that Check_MK creates uses these templates. # You *can* modify this file, but if you want to change parameters # for hosts and services a better idea is using extra_host_conf # and extra_service_conf. # # OMD users: your modifications to this file are handled # by 'omd update' so no problems should arise during an # update as long as your modifications to not collide # with modifications due to new versions of the file. OMD # will let you interactively resolve such a conflict. # # Non-OMD users: Usually this file is created as a symlink # in nagios/etc/conf.d (or objects or whatever directory # you are using) pointing to the shipped file. If you want # to modify this file, then replace the symlink with a true # copy of the file. Note, however, that a software update # of Check_MK will not update your check_mk_templates.cfg # anymore and you might get incompatible as time goes by. # ------------------------------------------------------------------ # ____ _ _ # / ___|___ _ __ | |_ __ _ ___| |_ ___ # | | / _ \| '_ \| __/ _` |/ __| __/ __| # | |__| (_) | | | | || (_| | (__| |_\__ \ # \____\___/|_| |_|\__\__,_|\___|\__|___/ # # This contact is only needed while you have not configured contacts # for your hosts and services with the variables # service_contactgroups and host_contactgroups. This is, because # Nagios does not allow a host or service to not have a contact. # And we want this default configuration file to be complete # and work. define contact { contact_name check_mk alias check_mk dummy contact host_notification_commands check-mk-dummy service_notification_commands check-mk-dummy host_notification_options n service_notification_options n host_notification_period 24X7 service_notification_period 24X7 } define contactgroup { contactgroup_name check_mk alias check_mk dummy contact group members check_mk } # _ _ _ # | | | | ___ ___| |_ ___ # | |_| |/ _ \/ __| __/ __| # | _ | (_) \__ \ |_\__ \ # |_| |_|\___/|___/\__|___/ # # Base template for all hosts that are monitored # with check_mk define host { name check_mk_default register 0 notifications_enabled 1 event_handler_enabled 0 flap_detection_enabled 1 failure_prediction_enabled 1 retain_status_information 1 retain_nonstatus_information 1 process_perf_data 0 check_command check-mk-host-ping check_interval 1 check_period 24X7 max_check_attempts 1 notification_interval 0 notification_period 24X7 notification_options d,u,r,f,s contact_groups check_mk } # This template is used for normal hosts define host { name check_mk_host use check_mk_default register 0 process_perf_data 1 action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_ } # If you use service aggregation than this template # is used for your summary hosts. The notes url # links to the detailed host belonging to this summary # host. You might need to adopt the URL. define host { name check_mk_host-summary use check_mk_default register 0 notes_url /nagios/cgi-bin/status.cgi?host=$_HOST_REALNAME$ } # Used for cluster hosts (i.e. the logical hosts, not # the cluster's nodes) define host { name check_mk_cluster use check_mk_default check_command check-mk-host-ping-cluster register 0 } # Used for aggregation host of clusters. define host { name check_mk_cluster-summary use check_mk_cluster,check_mk_host-summary register 0 } # ____ _ # / ___| ___ _ ____ _(_) ___ ___ ___ # \___ \ / _ \ '__\ \ / / |/ __/ _ \/ __| # ___) | __/ | \ V /| | (_| __/\__ \ # |____/ \___|_| \_/ |_|\___\___||___/ # # Template used by all other check_mk templates define service { name check_mk_default register 0 active_checks_enabled 1 passive_checks_enabled 1 parallelize_check 1 obsess_over_service 1 check_freshness 0 notifications_enabled 1 event_handler_enabled 0 flap_detection_enabled 1 failure_prediction_enabled 1 process_perf_data 0 retain_status_information 1 retain_nonstatus_information 1 notification_interval 0 is_volatile 0 normal_check_interval 1 retry_check_interval 1 max_check_attempts 1 notification_options u,c,w,r,f,s notification_period 24X7 check_period 24X7 } # Sub-Template used for checks using performance data define service { name check_mk_perf register 0 process_perf_data 1 action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$ } # This template is used by the service that actively # calls check_mk. Each host has exactly one service # using this template. Here you can configure, how often # each host should be checked. define service { name check_mk_active use check_mk_perf,check_mk_default register 0 check_command check-mk active_checks_enabled 1 } # This template is used for inventory checks. They # are generated if you set inventory_check_interval # to a number > 0 in main.mk define service { name check_mk_inventory use check_mk_default register 0 check_command check-mk-inventory active_checks_enabled 1 } # Check_mk knows, which checks have performance data # and assigns this template to these. You might need # to adapt the action_url. define service { name check_mk_passive_perf use check_mk_perf,check_mk_default register 0 active_checks_enabled 0 } # This is used for checks without performance data. define service { name check_mk_passive use check_mk_default register 0 active_checks_enabled 0 } # This template is used for aggregated services (on the # summary hosts). The never have performance data. A # check command must be defined - even if never called. # Notifications for aggregated services are disabled. # Otherwise you would get them twice. define service { name check_mk_summarized use check_mk_passive check_command check-mk-dummy ; never called register 0 notifications_enabled 0 } # Hosts with no configured or autodetected service will # get one service that is derived from the following # template. This is needed, because Nagios does not # allow a host without any service. define service { name check_mk_pingonly use check_mk_default register 0 check_command check-mk-ping service_description PING process_perf_data 0 active_checks_enabled 1 } # ____ _ _ # / ___| ___ _ ____ _(_) ___ ___ __| | ___ _ __ ___ # \___ \ / _ \ '__\ \ / / |/ __/ _ \ / _` |/ _ \ '_ \/ __| # ___) | __/ | \ V /| | (_| __/ | (_| | __/ |_) \__ \ # |____/ \___|_| \_/ |_|\___\___| \__,_|\___| .__/|___/ # |_| # This template is used by service dependencies created via # the configuration variable service_dependencies. Since we # only deal with passive checks the dependencies are not # used to suppress service checks. But they are very useful # for suppressing notifications. If you set inherits_parent # to 1, then if A depends on B and B depends on C, A will # automatically depend on C. This is usually what you want. # If A depends on B and B is in WARNING state, the notification # will *not* be suppressed. Check_mk generally uses WARNING state # if the service is still working. define servicedependency { name check_mk register 0 notification_failure_criteria u,c ; do not suppress in case of WARNING inherits_parent 1 } # ____ _ # / ___|___ _ __ ___ _ __ ___ __ _ _ __ __| |___ # | | / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __| # | |__| (_) | | | | | | | | | | | (_| | | | | (_| \__ \ # \____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/ # # Calling check_mk with precompiled checks define command { command_name check-mk command_line /usr/bin/python $USER4$/var/check_mk/precompiled/"$HOSTNAME$" } # Use this variant of if you are working without precompiled # checks (which is not recommended): # define command { # command_name check-mk # command_line check_mk $HOSTNAME$ $HOSTADDRESS$ #} # Inventory check define command { command_name check-mk-inventory command_line check_mk --cache --check-discovery "$HOSTNAME$" } define command { command_name check-mk-dummy command_line echo "DUMMY - Always OK" } # Commands for services of PING-only hosts define command { command_name check-mk-ping command_line $USER4$/lib/nagios/plugins/check_icmp $ARG1$ } # Host check commands define command { command_name check-mk-host-ping command_line $USER4$/lib/nagios/plugins/check_icmp $ARG1$ $HOSTADDRESS$ } define command { command_name check-mk-host-ping-cluster command_line $USER4$/lib/nagios/plugins/check_icmp -m 1 $ARG1$ $_HOSTNODEIPS$ } define command { command_name check-mk-host-ok command_line echo "OK - Host is always assumed to be up" } define command { command_name check-mk-host-tcp command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ } # General notification script. Details can be configured # in main.mk via notification_... options define command { command_name check-mk-notify command_line \ NOTIFY_CONTACTNAME='$CONTACTNAME$' \ NOTIFY_CONTACTEMAIL='$CONTACTEMAIL$' \ NOTIFY_CONTACTPAGER='$CONTACTPAGER$' \ NOTIFY_NOTIFICATIONTYPE='$NOTIFICATIONTYPE$' \ NOTIFY_HOSTNOTIFICATIONNUMBER='$HOSTNOTIFICATIONNUMBER$' \ NOTIFY_SERVICENOTIFICATIONNUMBER='$SERVICENOTIFICATIONNUMBER$' \ NOTIFY_HOSTPROBLEMID='$HOSTPROBLEMID$' \ NOTIFY_SERVICEPROBLEMID='$SERVICEPROBLEMID$' \ NOTIFY_HOSTNAME='$HOSTNAME$' \ NOTIFY_HOSTALIAS='$HOSTALIAS$' \ NOTIFY_HOSTADDRESS='$HOSTADDRESS$' \ NOTIFY_HOSTATTEMPT='$HOSTATTEMPT$' \ NOTIFY_LASTHOSTSTATE='$LASTHOSTSTATE$' \ NOTIFY_LASTHOSTSTATEID='$LASTHOSTSTATEID$' \ NOTIFY_LASTHOSTSTATECHANGE='$LASTHOSTSTATECHANGE$' \ NOTIFY_LASTHOSTUP='$LASTHOSTUP$' \ NOTIFY_HOSTSTATE='$HOSTSTATE$' \ NOTIFY_HOSTSTATEID='$HOSTSTATEID$' \ NOTIFY_HOSTCHECKCOMMAND="$HOSTCHECKCOMMAND$" \ NOTIFY_HOSTOUTPUT='$HOSTOUTPUT$' \ NOTIFY_HOSTPERFDATA='$HOSTPERFDATA$' \ NOTIFY_LONGHOSTOUTPUT='$LONGHOSTOUTPUT$' \ NOTIFY_SERVICEDESC='$SERVICEDESC$' \ NOTIFY_LASTSERVICESTATE='$LASTSERVICESTATE$' \ NOTIFY_LASTSERVICESTATEID='$LASTSERVICESTATEID$' \ NOTIFY_LASTSERVICESTATECHANGE='$LASTSERVICESTATECHANGE$' \ NOTIFY_LASTSERVICEOK='$LASTSERVICEOK$' \ NOTIFY_SERVICEATTEMPT='$SERVICEATTEMPT$' \ NOTIFY_SERVICESTATE='$SERVICESTATE$' \ NOTIFY_SERVICESTATEID='$SERVICESTATEID$' \ NOTIFY_SERVICEOUTPUT='$SERVICEOUTPUT$' \ NOTIFY_LONGSERVICEOUTPUT='$LONGSERVICEOUTPUT$' \ NOTIFY_SERVICEPERFDATA='$SERVICEPERFDATA$' \ NOTIFY_SERVICECHECKCOMMAND="$SERVICECHECKCOMMAND$" \ NOTIFY_DATE='$DATE$' \ NOTIFY_SHORTDATETIME='$SHORTDATETIME$' \ NOTIFY_LONGDATETIME='$LONGDATETIME$' \ NOTIFY_HOSTDOWNTIME='$HOSTDOWNTIME$' \ NOTIFY_NOTIFICATIONCOMMENT='$NOTIFICATIONCOMMENT$' \ NOTIFY_NOTIFICATIONAUTHOR='$NOTIFICATIONAUTHOR$' \ NOTIFY_NOTIFICATIONAUTHORNAME='$NOTIFICATIONAUTHORNAME$' \ NOTIFY_NOTIFICATIONAUTHORALIAS='$NOTIFICATIONAUTHORALIAS$' \ NOTIFY_SERVICEACKAUTHOR='$SERVICEACKAUTHOR$' \ NOTIFY_SERVICEACKCOMMENT='$SERVICEACKCOMMENT$' \ NOTIFY_SERVICEGROUPNAMES='$SERVICEGROUPNAMES$' \ NOTIFY_HOSTACKAUTHOR='$HOSTACKAUTHOR$' \ NOTIFY_HOSTACKCOMMENT='$HOSTACKCOMMENT$' \ NOTIFY_HOSTGROUPNAMES='$HOSTGROUPNAMES$' \ NOTIFY_HOSTTAGS='$_HOSTTAGS$' \ NOTIFY_HOST_SL='$_HOSTEC_SL$' \ NOTIFY_SVC_SL='$_SERVICEEC_SL$' \ NOTIFY_SERVICE_SL='$_SERVICEEC_SL$' \ NOTIFY_HOST_EC_CONTACT='$_HOSTEC_CONTACT$' \ NOTIFY_SERVICE_EC_CONTACT='$_SERVICEEC_CONTACT$' \ NOTIFY_HOST_ADDRESS_4='$_HOSTADDRESS_4$' \ NOTIFY_HOST_ADDRESS_6='$_HOSTADDRESS_6$' \ NOTIFY_HOST_ADDRESS_FAMILY='$_HOSTADDRESS_FAMILY$' \ check_mk --notify } # _____ _ _ _ # |_ _(_)_ __ ___ ___ _ __ ___ _ __(_) ___ __| |___ # | | | | '_ ` _ \ / _ \ '_ \ / _ \ '__| |/ _ \ / _` / __| # | | | | | | | | | __/ |_) | __/ | | | (_) | (_| \__ \ # |_| |_|_| |_| |_|\___| .__/ \___|_| |_|\___/ \__,_|___/ # |_| # # Make sure, timeperiod used in default template is available define timeperiod { timeperiod_name 24X7 alias Dummy time period for check_mk 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 }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor