[icinga-checkins] icinga.org: icinga2/next: Documentation: Add a note on host and service checks.

git at icinga.org git at icinga.org
Mon Jun 2 14:40:03 CEST 2014


Module: icinga2
Branch: next
Commit: bef81e688116023f57515b2489a7a7645e64fca1
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=bef81e688116023f57515b2489a7a7645e64fca1

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Mon Jun  2 14:39:42 2014 +0200

Documentation: Add a note on host and service checks.

Fixes #6361

---

 doc/2-getting-started.md   |    3 ++-
 doc/3-monitoring-basics.md |   19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/doc/2-getting-started.md b/doc/2-getting-started.md
index 45aad86..6ef2e51 100644
--- a/doc/2-getting-started.md
+++ b/doc/2-getting-started.md
@@ -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
diff --git a/doc/3-monitoring-basics.md b/doc/3-monitoring-basics.md
index f431178..78c54fc 100644
--- a/doc/3-monitoring-basics.md
+++ b/doc/3-monitoring-basics.md
@@ -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
 



More information about the icinga-checkins mailing list