/etc/icinga/objects/check_mk/check_mk_templates.cfg is in check-mk-config-icinga 1.1.12-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | # 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 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-ping
check_interval 1
check_period 24X7
max_check_attempts 1
notification_interval 0
notification_period 24X7
notification_options d,u,r,f
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-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
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 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 /var/lib/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 /usr/bin/check_mk $HOSTNAME$ $HOSTADDRESS$
#}
# Inventory check
define command {
command_name check-mk-inventory
command_line /usr/bin/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 /usr/lib/nagios/plugins/check_icmp $ARG1$ $HOSTADDRESS$
}
# Check for clusters: it is UP if at least one node is up
define command {
command_name check-mk-ping-cluster
command_line /usr/lib/nagios/plugins/check_icmp -m 1 $ARG1$ $_HOSTNODEIPS$
}
# _____ _ _ _
# |_ _(_)_ __ ___ ___ _ __ ___ _ __(_) ___ __| |___
# | | | | '_ ` _ \ / _ \ '_ \ / _ \ '__| |/ _ \ / _` / __|
# | | | | | | | | | __/ |_) | __/ | | | (_) | (_| \__ \
# |_| |_|_| |_| |_|\___| .__/ \___|_| |_|\___/ \__,_|___/
# |_|
#
# 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
}
|