Documentation: Fix notifications for hosts and services.

Fixes #6114
This commit is contained in:
Michael Friedrich 2014-05-03 20:07:37 +02:00
parent 0691d73af9
commit 56bdf820b7

View File

@ -132,13 +132,14 @@ Attributes:
### <a id="objecttype-notification"></a> Notification ### <a id="objecttype-notification"></a> Notification
Notification objects are used to specify how users should be notified in case 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** > **Best Practice**
> >
> Rather than creating a `Notification` object for a specific service it is usually easier > Rather than creating a `Notification` object for a specific host or service it is
> to just create a `Notification` template and use the `apply` keyword to assign the > usually easier to just create a `Notification` template and use the `apply` keyword
> notification to a number of services. > 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: Example:
@ -158,7 +159,7 @@ Attributes:
Name | Description Name | Description
--------------------------|---------------- --------------------------|----------------
host_name | **Required.** The name of the host this notification belongs to. 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. 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. users | **Optional.** A list of user names who should be notified.
user_groups | **Optional.** A list of user group 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** > **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 > 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: Example:
@ -219,9 +221,9 @@ Attributes:
Name |Description Name |Description
----------------|---------------- ----------------|----------------
parent_host_name |**Required.** The parent host. 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_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_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. disable_notifications|**Optional.** Whether to disable notifications when this dependency fails. Defaults to true.
period |**Optional.** Time period during which this dependency is enabled. 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** > **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 > 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: Example:
@ -377,8 +380,8 @@ Attributes:
Name |Description Name |Description
----------------|---------------- ----------------|----------------
host_name |**Required.** The name of the host this notification belongs to. host_name |**Required.** The name of the host this scheduled downtime 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 scheduled downtime belongs to. If omitted this downtime object is treated as host downtime.
author |**Required.** The author of the downtime. author |**Required.** The author of the downtime.
comment |**Required.** A comment for the downtime. comment |**Required.** A comment for the downtime.
fixed |**Optional.** Whether this is a fixed downtime. Defaults to true. fixed |**Optional.** Whether this is a fixed downtime. Defaults to true.
@ -397,9 +400,9 @@ Specifies Icinga 2 logging to a file.
Example: Example:
object FileLogger "my-debug-file" { object FileLogger "debug-file" {
severity = "debug" severity = "debug"
path = "/var/log/icinga2/icinga2-debug.log" path = "/var/log/icinga2/debug.log"
} }
Attributes: Attributes:
@ -415,7 +418,7 @@ Specifies Icinga 2 logging to syslog.
Example: Example:
object SyslogLogger "my-crit-syslog" { object SyslogLogger "crit-syslog" {
severity = "critical" severity = "critical"
} }