# This is an example configuration file for integrating # check_mk into Nagios. It defines several templates for # hosts and services that are referred to by the Nagios- # configuration output by check_mk. It also defines # commands called by active check_mk-checks. # ------------------------------------------------------------------ # In most cases it should be sufficient to copy or # symlink this file into your nagios object-directory # without changing it. # ____ _ _ # / ___|___ _ __ | |_ __ _ ___| |_ ___ # | | / _ \| '_ \| __/ _` |/ __| __/ __| # | |__| (_) | | | | || (_| | (__| |_\__ \ # \____\___/|_| |_|\__\__,_|\___|\__|___/ # # This contact is only needed while you have not configured contacts # for your hosts and services with the varibables # 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 service_notification_options 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 notifications_enabled 1 event_handler_enabled 0 flap_detection_enabled 1 failure_prediction_enabled 1 process_perf_data 1 retain_status_information 1 retain_nonstatus_information 1 check_command check-mk-ping check_interval 1 max_check_attempts 1 notification_interval 0 notification_period 24X7 notification_options d,u,r,f contact_groups check_mk action_url @NAGIOSURL@/pnp/index.php?host=$HOSTNAME$ } # This template is used for normal hosts define host { name check_mk_host use check_mk_default register 0 } # 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_host register 0 notes_url @CGIURL@/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 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 notification_period 24X7 check_period 24X7 } # 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_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_default register 0 active_checks_enabled 0 process_perf_data 1 action_url @NAGIOSURL@/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$ } # 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 suppression 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 python @VARDIR@/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 @BINDIR@/check_mk $HOSTNAME$ $HOSTADDRESS$ #} # Inventory check define command { command_name check-mk-inventory command_line @BINDIR@/check_mk --cache --check-inventory $HOSTNAME$ } define command { command_name check-mk-dummy command_line echo "DUMMY - Always OK" } define command { command_name check-mk-ping command_line @CHECK_ICMP@ $HOSTADDRESS$ } # _____ _ _ _ # |_ _(_)_ __ ___ ___ _ __ ___ _ __(_) ___ __| |___ # | | | | '_ ` _ \ / _ \ '_ \ / _ \ '__| |/ _ \ / _` / __| # | | | | | | | | | __/ |_) | __/ | | | (_) | (_| \__ \ # |_| |_|_| |_| |_|\___| .__/ \___|_| |_|\___/ \__,_|___/ # |_| # # 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 }