]> granicus.if.org Git - icinga2/commitdiff
Documentation: Add a note on host and service checks.
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 2 Jun 2014 12:39:42 +0000 (14:39 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 2 Jun 2014 12:39:42 +0000 (14:39 +0200)
Fixes #6361

doc/2-getting-started.md
doc/3-monitoring-basics.md

index 45aad8633cc944aa965ed85396cce56a3dd2f66f..6ef2e51d98cae008c57a112a3bb78c1728c24273 100644 (file)
@@ -197,7 +197,8 @@ The `conf.d/localhost.conf` file contains our first host definition:
 
 This defines the host `localhost`. The `import` keyword is used to import
 the `generic-host` template which takes care of setting up the host check
-command.
+command to `hostalive`. If you require a different check command, you can
+override it in the object definition.
 
 The `vars` attribute can be used to define custom attributes which are available
 for check and notification commands. Most of the templates in the Icinga
index f431178ff329f257b76072f8381c81d88966fb55..78c54fc1a6289bd52805eaf1f5b9435b5eacfed1 100644 (file)
@@ -40,7 +40,7 @@ host `my-server1`.
 It also specifies that the host should perform its own check using the `hostalive`
 check command.
 
-The `address` custom attribute is used by check commands to determine which network
+The `address` attribute is used by check commands to determine which network
 address is associated with the host object.
 
 Details on troubleshooting check problems can be found [here](#troubleshooting).
@@ -80,7 +80,24 @@ state the host/service switches to a `HARD` state and notifications are sent.
   HARD        | The host/service's state hasn't recently changed.
   SOFT        | The host/service has recently changed state and is being re-checked.
 
+### <a id="host-service-checks"></a> Host and Service Checks
 
+Hosts and Services determine their state from a check result returned from a check
+execution to the Icinga 2 application. By default the `generic-host` example template
+will define `hostalive` as host check. If your host is unreachable for ping, you should
+consider using a different check command, for instance the `http` check command, or if
+there is no check available, the `dummy` check command.
+
+    object Host "uncheckable-host" {
+      check_command = "dummy"
+      vars.dummy_state = 1
+      vars.dummy_text = "Pretending to be OK."
+    }
+
+Service checks could also use a `dummy` check, but the common strategy is to
+[integrate an existing plugin](#command-plugin-integration) as
+[check command](#check-commands) and [reference](#command-passing-parameters)
+that in your [Service](#objecttype-service) object definition.
 
 ## <a id="configuration-best-practice"></a> Configuration Best Practice