From 831743fa0ae9d30ea45e0592a2e6e4a3557e6865 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 22 May 2014 21:32:54 +0200 Subject: [PATCH] Documentation: Add references to apply examples to general configuration objects. Fixes #6258 --- doc/3-monitoring-basics.md | 3 +-- doc/5-configuring-icinga-2.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/3-monitoring-basics.md b/doc/3-monitoring-basics.md index 97fb31d78..d36ff9953 100644 --- a/doc/3-monitoring-basics.md +++ b/doc/3-monitoring-basics.md @@ -208,7 +208,7 @@ the user groups are associated as attributes in `Notification` objects. If there is a certain number of hosts, services or users matching a pattern it's reasonable to assign the group object to these members. -Details on the `assign where` syntax can be found [here](#group-assign) +Details on the `assign where` syntax can be found [here](#apply) object HostGroup "mssql" { display_name = "MSSQL Servers" @@ -261,7 +261,6 @@ You can add all shared attributes to a `Notification` template which is inherite to the defined notifications. That way you'll save duplicated attributes in each `Notification` object. Attributes can be overridden locally. - template Notification "generic-notification" { interval = 15m diff --git a/doc/5-configuring-icinga-2.md b/doc/5-configuring-icinga-2.md index 1791755c0..502bb7d93 100644 --- a/doc/5-configuring-icinga-2.md +++ b/doc/5-configuring-icinga-2.md @@ -592,6 +592,10 @@ Attributes: A group of hosts. +> **Best Practice** +> +> Assign host group members using the [group assign](#group-assign) rules. + Example: object HostGroup "my-hosts" { @@ -615,6 +619,7 @@ by Icinga 2. > Rather than creating a `Service` object for a specific host it is usually easier > to just create a `Service` template and use the `apply` keyword to assign the > service to a number of hosts. +> Check the [apply](#using-apply) chapter for details. Example: @@ -671,6 +676,10 @@ you can define more than one object with the same (short) name as long as the `h A group of services. +> **Best Practice** +> +> Assign service group members using the [group assign](#group-assign) rules. + Example: object ServiceGroup "snmp" { @@ -745,6 +754,10 @@ Attributes: A user group. +> **Best Practice** +> +> Assign user group members using the [group assign](#group-assign) rules. + Example: object UserGroup "icingaadmins" { @@ -915,6 +928,7 @@ of host and service state changes and other events. > 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`. +> Check the [notifications](#notifications) chapter for detailed examples. Example: @@ -1013,6 +1027,7 @@ ScheduledDowntime objects can be used to set up recurring downtimes for services > to just create a `ScheduledDowntime` template and use the `apply` keyword to assign the > scheduled downtime to a number of hosts or services. Use the `to` keyword to set the specific target > type for `Host` or `Service`. +> Check the [recurring downtimes](#recurring-downtimes) example for details. Example: @@ -1060,6 +1075,7 @@ Dependency objects are used to specify dependencies between hosts and services. > to just create a `Dependency` template and use the `apply` keyword to assign the > dependency to a number of hosts or services. Use the `to` keyword to set the specific target > type for `Host` or `Service`. +> Check the [dependencies](#dependencies) chapter for detailed examples. Example: