From: Michael Friedrich Date: Sat, 3 May 2014 18:07:37 +0000 (+0200) Subject: Documentation: Fix notifications for hosts and services. X-Git-Tag: v0.0.11~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56bdf820b7e2a1bf77a62772d9b3766048d3ceb8;p=icinga2 Documentation: Fix notifications for hosts and services. Fixes #6114 --- diff --git a/doc/4.3-object-types.md b/doc/4.3-object-types.md index e45f10e24..a418075e0 100644 --- a/doc/4.3-object-types.md +++ b/doc/4.3-object-types.md @@ -132,13 +132,14 @@ Attributes: ### 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" }