]> granicus.if.org Git - icinga2/commitdiff
Documentation: Fix notifications for hosts and services.
authorMichael Friedrich <Michael.Friedrich@netways.de>
Sat, 3 May 2014 18:07:37 +0000 (20:07 +0200)
committerMichael Friedrich <Michael.Friedrich@netways.de>
Sat, 3 May 2014 18:07:37 +0000 (20:07 +0200)
Fixes #6114

doc/4.3-object-types.md

index e45f10e24ceec51f67ff23e909bbdb1f648a7c90..a418075e0ed4eb1923abba12ad1dedf269b599d6 100644 (file)
@@ -132,13 +132,14 @@ Attributes:
 ### <a id="objecttype-notification"></a> Notification
 
 Notification objects are used to specify how users should be notified in case
-of service state changes and other events.
+of host and service state changes and other events.
 
 > **Best Practice**
 >
-> Rather than creating a `Notification` object for a specific service it is usually easier
-> to just create a `Notification` template and use the `apply` keyword to assign the
-> notification to a number of services.
+> Rather than creating a `Notification` object for a specific host or service it is
+> usually easier to just create a `Notification` template and use the `apply` keyword
+> to assign the notification to a number of hosts or services. Use the `to` keyword
+> to set the specific target type for `Host` or `Service`.
 
 Example:
 
@@ -158,7 +159,7 @@ Attributes:
   Name                      | Description
   --------------------------|----------------
   host_name                 | **Required.** The name of the host this notification belongs to.
-  service_name              | **Required.** The short name of the service this notification belongs to.
+  service_name              | **Optional.** The short name of the service this notification belongs to. If omitted this notification object is treated as host notification.
   vars                      | **Optional.** A dictionary containing custom attributes that are specific to this notification object.
   users                     | **Optional.** A list of user names who should be notified.
   user_groups               | **Optional.** A list of user group names who should be notified.
@@ -196,9 +197,10 @@ Dependency objects are used to specify dependencies between hosts and services.
 
 > **Best Practice**
 >
-> Rather than creating a `Dependency` object for a specific service it is usually easier
+> Rather than creating a `Dependency` object for a specific host or service it is usually easier
 > to just create a `Dependency` template and use the `apply` keyword to assign the
-> dependency to a number of services.
+> dependency to a number of hosts or services. Use the `to` keyword to set the specific target
+> type for `Host` or `Service`.
 
 Example:
 
@@ -219,9 +221,9 @@ Attributes:
   Name            |Description
   ----------------|----------------
   parent_host_name     |**Required.** The parent host.
-  parent_service_name  |**Optional.** The parent service. When not specified the host's check service is used.
+  parent_service_name  |**Optional.** The parent service. If omitted this dependency object is treated as host dependency.
   child_host_name      |**Required.** The child host.
-  child_service_name   |**Optional.** The child service. When not specified the host's check service is used.
+  child_service_name   |**Optional.** The child service. If omitted this dependency object is treated as host dependency.
   disable_checks  |**Optional.** Whether to disable checks when this dependency fails. Defaults to false.
   disable_notifications|**Optional.** Whether to disable notifications when this dependency fails. Defaults to true.
   period          |**Optional.** Time period during which this dependency is enabled.
@@ -352,9 +354,10 @@ ScheduledDowntime objects can be used to set up recurring downtimes for services
 
 > **Best Practice**
 >
-> Rather than creating a `ScheduledDowntime` object for a specific service it is usually easier
+> Rather than creating a `ScheduledDowntime` object for a specific host or service it is usually easier
 > to just create a `ScheduledDowntime` template and use the `apply` keyword to assign the
-> scheduled downtime to a number of services.
+> scheduled downtime to a number of hosts or services. Use the `to` keyword to set the specific target
+> type for `Host` or `Service`.
 
 Example:
 
@@ -377,8 +380,8 @@ Attributes:
 
   Name            |Description
   ----------------|----------------
-  host_name       |**Required.** The name of the host this notification belongs to.
-  service_name    |**Required.** The short name of the service this notification belongs to.
+  host_name       |**Required.** The name of the host this scheduled downtime belongs to.
+  service_name    |**Optional.** The short name of the service this scheduled downtime belongs to. If omitted this downtime object is treated as host downtime.
   author          |**Required.** The author of the downtime.
   comment         |**Required.** A comment for the downtime.
   fixed           |**Optional.** Whether this is a fixed downtime. Defaults to true.
@@ -397,9 +400,9 @@ Specifies Icinga 2 logging to a file.
 
 Example:
 
-    object FileLogger "my-debug-file" {
+    object FileLogger "debug-file" {
       severity = "debug"
-      path = "/var/log/icinga2/icinga2-debug.log"
+      path = "/var/log/icinga2/debug.log"
     }
 
 Attributes:
@@ -415,7 +418,7 @@ Specifies Icinga 2 logging to syslog.
 
 Example:
 
-    object SyslogLogger "my-crit-syslog" {
+    object SyslogLogger "crit-syslog" {
       severity = "critical"
     }