]> granicus.if.org Git - icinga2/commitdiff
Update documentation.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 19 Mar 2014 11:44:53 +0000 (12:44 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 19 Mar 2014 11:46:23 +0000 (12:46 +0100)
Refs #5789

13 files changed:
doc/3.02-commands.md
doc/3.03-macros.md
doc/3.04-notifications.md
doc/4.1-configuration-syntax.md
doc/4.3-object-types.md
doc/6.04-cluster.md
doc/6.05-domains.md
doc/8-differences-between-icinga-1x-and-2.md
etc/icinga2/conf.d/generic-user.conf
etc/icinga2/conf.d/notifications.conf
etc/icinga2/features-available/debuglog.conf
etc/icinga2/features-available/mainlog.conf
lib/icinga/host-apply.cpp

index 584a8405ed0bc81ac3011818afc97a87960eda66..4f3cddc4040d1dda604823315d28a989ffec8af5 100644 (file)
@@ -113,7 +113,7 @@ If you require default macro definitions, you can add a macro dictionary as show
 `CheckCommand` object.
 
     object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
-      command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
+      command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
 
       export_macros = [
         "NOTIFICATIONTYPE",
index 4c55fa915b226ffe025832cc61e2fe4e47fb0ca3..6c1b67cdbad316694d0d8b4d02bcb53b85fc6016 100644 (file)
@@ -273,7 +273,7 @@ Example:
     ...
 
     {
-      check_interval = (MyCheckInterval / 2.5)
+      check_interval = MyCheckInterval / 2.5
     }
 
 More details in the chapter [Constant Expressions](#constant-expressions).
index 6f1b09a1db9b535fda6f95f52d110f0531b3c74f..86b8d820f6b564d523338ffff7ecc7b84ba9c1e6 100644 (file)
@@ -25,11 +25,11 @@ The user `icingaadmin` in the example below will get notified only on `WARNING`
     object User "icingaadmin" {
       display_name = "Icinga 2 Admin",
       enable_notifications = 1,
-      notification_state_filter = (StateFilterOK |
-                                   StateFilterWarning |
-                                   StateFilterCritical),
-      notification_type_filter = (NotificationFilterProblem |
-                                   NotificationFilterRecovery),  
+      notification_state_filter = StateFilterOK |
+                                  StateFilterWarning |
+                                  StateFilterCritical,
+      notification_type_filter = NotificationFilterProblem |
+                                 NotificationFilterRecovery,
       macros = {
         "email" = "icinga@localhost",
         "pager" = "+49123456789"
@@ -59,7 +59,7 @@ There are various macros available at runtime execution of the `NotificationComm
 The example below may or may not fit your needs.
 
     object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
-      command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
+      command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
 
       export_macros = [
         "NOTIFICATIONTYPE",
@@ -91,18 +91,18 @@ to the defined notifications. That way you'll save duplicated attributes in each
     
       notification_command = "mail-service-notification",
   
-      notification_state_filter = (StateFilterWarning |
-                                   StateFilterCritical |
-                                   StateFilterUnknown),
-      notification_type_filter = (NotificationFilterProblem |
-                                  NotificationFilterAcknowledgement |
-                                  NotificationFilterRecovery |
-                                  NotificationFilterCustom |
-                                  NotificationFilterFlappingStart |
-                                  NotificationFilterFlappingEnd |
-                                  NotificationFilterDowntimeStart |
-                                  NotificationFilterDowntimeEnd |
-                                  NotificationFilterDowntimeRemoved),
+      notification_state_filter = StateFilterWarning |
+                                  StateFilterCritical |
+                                  StateFilterUnknown,
+      notification_type_filter = NotificationFilterProblem |
+                                 NotificationFilterAcknowledgement |
+                                 NotificationFilterRecovery |
+                                 NotificationFilterCustom |
+                                 NotificationFilterFlappingStart |
+                                 NotificationFilterFlappingEnd |
+                                 NotificationFilterDowntimeStart |
+                                 NotificationFilterDowntimeEnd |
+                                 NotificationFilterDowntimeRemoved,
   
       notification_period = "24x7"
     }
@@ -274,18 +274,18 @@ Available state and type filters for notifications are:
 
     template Notification "generic-notification" {
   
-      notification_state_filter = (StateFilterWarning |
-                                   StateFilterCritical |
-                                   StateFilterUnknown),
-      notification_type_filter = (NotificationFilterProblem |
-                                  NotificationFilterAcknowledgement |
-                                  NotificationFilterRecovery |
-                                  NotificationFilterCustom |
-                                  NotificationFilterFlappingStart |
-                                  NotificationFilterFlappingEnd |
-                                  NotificationFilterDowntimeStart |
-                                  NotificationFilterDowntimeEnd |
-                                  NotificationFilterDowntimeRemoved),
+      notification_state_filter = StateFilterWarning |
+                                  StateFilterCritical |
+                                  StateFilterUnknown,
+      notification_type_filter = NotificationFilterProblem |
+                                 NotificationFilterAcknowledgement |
+                                 NotificationFilterRecovery |
+                                 NotificationFilterCustom |
+                                 NotificationFilterFlappingStart |
+                                 NotificationFilterFlappingEnd |
+                                 NotificationFilterDowntimeStart |
+                                 NotificationFilterDowntimeEnd |
+                                 NotificationFilterDowntimeRemoved,
     }
 
 > **Note**
index 433736843f47184edc578afaafeeda9676d19be4..d3bdf231140dfefdb51919654d1724e8c562deee 100644 (file)
@@ -324,7 +324,7 @@ Valid operators include ~, !, +, -, *, /, ==,  !=, in and !in. The default prece
 overridden by grouping expressions using parentheses:
 
     {
-      check_interval (30 + 60) / 2
+      check_interval (30 + 60) / 2
     }
 
 Global constants may be used in constant expressions.
index 68847254e98fe4cb1711ec031c98a539e80eb8b8..0af7c07de86043e8c25f2ac9e4aac2cac02e37ec 100644 (file)
@@ -214,7 +214,7 @@ Example:
       parent_host = "internet",
       parent_service = "ping4",
 
-      state_filter = (StateFilterOK),
+      state_filter = StateFilterOK,
 
       disable_checks = true
     }
@@ -230,7 +230,7 @@ Attributes:
   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.
-  state_filter    |**Optional.** A set of type filters when this dependency should be OK. Defaults to (StateFilterOK &#124; StateFilterWarning).
+  state_filter    |**Optional.** A set of type filters when this dependency should be OK. Defaults to StateFilterOK &#124; StateFilterWarning.
 
 Available state filters:
 
@@ -252,12 +252,12 @@ Example:
       enable_notifications = 1,
       notification_period = "24x7",
 
-      notification_state_filter = (StateFilterOK |
-                                   StateFilterWarning |
-                                   StateFilterCritical |
-                                   StateFilterUnknown),
-      notification_type_filter = (NotificationFilterProblem |
-                                  NotificationFilterRecovery),
+      notification_state_filter = StateFilterOK |
+                                  StateFilterWarning |
+                                  StateFilterCritical |
+                                  StateFilterUnknown,
+      notification_type_filter = NotificationFilterProblem |
+                                 NotificationFilterRecovery,
       macros = {
         "name" = "Icinga 2 Admin",
         "email" = "icinga@localhost",
@@ -458,7 +458,7 @@ A notification command definition.
 Example:
 
     object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
-      command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
+      command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
 
       export_macros = [
         "NOTIFICATIONTYPE",
@@ -588,7 +588,7 @@ Example:
         logentries_age = 31d,
       },
 
-      categories = (DbCatConfig | DbCatState)
+      categories = DbCatConfig | DbCatState
     }
 
 Attributes:
@@ -672,7 +672,7 @@ Example:
         logentries_age = 31d,
       },
 
-      categories = (DbCatConfig | DbCatState)
+      categories = DbCatConfig | DbCatState
     }
 
 Attributes:
@@ -877,7 +877,7 @@ a defined JSON file.
 Example:
 
     object IcingaStatusWriter "status" {
-      status_path = (IcingaLocalStateDir + "/cache/icinga2/status.json"),
+      status_path = IcingaLocalStateDir + "/cache/icinga2/status.json",
       update_interval = 15s
     }
 
@@ -962,8 +962,8 @@ Example:
 
     object Domain "dmz-1" {
       acl = {
-        node1 = (DomainPrivCheckResult),
-        node2 = (DomainPrivReadWrite)
+        node1 = DomainPrivCheckResult,
+        node2 = DomainPrivReadWrite
       }
     }
 
@@ -980,5 +980,5 @@ Domain ACLs:
   DomainPrivRead        | Endpoint reads local messages and relays them to remote nodes.
   DomainPrivCheckResult | Endpoint accepts check result messages from remote nodes.
   DomainPrivCommand     | Endpoint accepts command messages from remote nodes.
-  DomainPrevReadOnly    | Endpoint reads local messages and relays them to remote nodes.
-  DomainPrivReadWrite   | Combination of (DomainPrivRead | DomainPrivCheckResult | DomainPrivCommand)
+  DomainPrevReadOnly    | Equivalent to DomainPrivRead.
+  DomainPrivReadWrite   | Equivalent to DomainPrivRead &#124; DomainPrivCheckResult &#124; DomainPrivCommand.
index 9284d79ece5802d4060ca7034d065c3ddf0c16ff..d720c75b8cb92e5bcb63c7eec39b21efae0b9454 100644 (file)
@@ -129,7 +129,7 @@ In order to load configuration files which were received from a remote Icinga 2
 instance you will have to add the following include directive to your
 `icinga2.conf` configuration file:
 
-    include (IcingaLocalStateDir + "/lib/icinga2/cluster/config/*/*")
+    include IcingaLocalStateDir + "/lib/icinga2/cluster/config/*/*"
 
 ### <a id="initial-cluster-sync"></a> Initial Cluster Sync
 
index 3e79ae35b047a814387c9ac9b86c2fa317d7634b..157816c75490f42dcbb00cb6db533d2b227e6904 100644 (file)
@@ -25,7 +25,7 @@ from the `icinga-node-dmz-1` endpoint.
 
     object Domain "dmz-db" {
       acl = {
-        icinga-node-dmz-1 = (DomainPrivReadOnly),
-        icinga-node-dmz-2 = (DomainPrivReadWrite)
+        icinga-node-dmz-1 = DomainPrivReadOnly,
+        icinga-node-dmz-2 = DomainPrivReadWrite
       }
     }
\ No newline at end of file
index e8f4187d4e1cdc6d818fc96f757f8c4fff65450e..82e7f60f41cae2fd2e778ceb10faa9ef733cc1c6 100644 (file)
@@ -463,8 +463,8 @@ All state and type filter use long names or'd with a pipe together
 
     notification_options w,u,c,r,f,s
 
-    notification_state_filter = (StateFilterWarning | StateFilterUnknown | StateFilterCritical),
-    notification_type_filter = (NotificationProblem | NotificationRecovery | NotificationFlappingStart | NotificationFlappingEnd | NotificationDowntimeStart | NotificationDowntimeEnd | NotificationDowntimeRemoved)
+    notification_state_filter = StateFilterWarning | StateFilterUnknown | StateFilterCritical,
+    notification_type_filter = NotificationProblem | NotificationRecovery | NotificationFlappingStart | NotificationFlappingEnd | NotificationDowntimeStart | NotificationDowntimeEnd | NotificationDowntimeRemoved
 
 > **Note**
 >
index a2dae8d8be5649fc7aa7b1818d2163a8f6966bb6..66f78cd88b280907180c1ed9b902cad60cf3a7d0 100644 (file)
@@ -7,10 +7,10 @@ template User "generic-user" {
   enable_notifications = true,
   notification_period = "24x7",
 
-  notification_state_filter = (StateFilterWarning |
+  notification_state_filter = StateFilterWarning |
                                StateFilterCritical |
-                               StateFilterUnknown),
-  notification_type_filter = (NotificationFilterProblem |
+                               StateFilterUnknown,
+  notification_type_filter = NotificationFilterProblem |
                               NotificationFilterAcknowledgement |
                               NotificationFilterRecovery |
                               NotificationFilterCustom |
@@ -18,5 +18,5 @@ template User "generic-user" {
                               NotificationFilterFlappingEnd |
                               NotificationFilterDowntimeStart |
                               NotificationFilterDowntimeEnd |
-                              NotificationFilterDowntimeRemoved)
+                              NotificationFilterDowntimeRemoved
 }
index e74ae8f1b2795a2f684a48c5acdb2227c461ee1f..5bd59810c3931f7759a6babce434d11fe685b1c1 100644 (file)
@@ -5,11 +5,11 @@
 template Notification "mail-notification" {
   notification_command = "mail-service-notification",
 
-  notification_state_filter = (StateFilterOK |
+  notification_state_filter = StateFilterOK |
                                StateFilterWarning |
                                StateFilterCritical |
-                               StateFilterUnknown),
-  notification_type_filter = (NotificationFilterProblem |
+                               StateFilterUnknown,
+  notification_type_filter = NotificationFilterProblem |
                               NotificationFilterAcknowledgement |
                               NotificationFilterRecovery |
                               NotificationFilterCustom | 
@@ -17,13 +17,13 @@ template Notification "mail-notification" {
                               NotificationFilterFlappingEnd | 
                               NotificationFilterDowntimeStart |
                               NotificationFilterDowntimeEnd | 
-                              NotificationFilterDowntimeRemoved),
+                              NotificationFilterDowntimeRemoved,
 
   notification_period = "24x7"
 }
 
 object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
-  command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
+  command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
 
   export_macros = [
     "NOTIFICATIONTYPE",
index 656b8f7be556e3dbd5f3a25344d572149d64555d..86947cbec354b38c96c13a8407162ed923f297db 100644 (file)
@@ -6,6 +6,6 @@
 
 object FileLogger "debug-file" {
   severity = "debug",
-  path = (IcingaLocalStateDir + "/log/icinga2/debug.log")
+  path = IcingaLocalStateDir + "/log/icinga2/debug.log"
 }
 
index 848f7398aa5daaf5d5e096390155c61f91cc3f58..2d237a451d530812224a539da12c09c21a627af7 100644 (file)
@@ -4,6 +4,6 @@
 
 object FileLogger "main-log" {
   severity = "information",
-  path = (IcingaLocalStateDir + "/log/icinga2/icinga2.log")
+  path = IcingaLocalStateDir + "/log/icinga2/icinga2.log"
 }
 
index 0d381f21df40186336943755ea98b47331c74e55..46b1beb4819c4620b96758f8b51557d9ca417fb0 100644 (file)
@@ -66,8 +66,9 @@ void Host::EvaluateApplyRules(const std::vector<ApplyRule>& rules)
                                continue;
                        }
 
-                       if (result.IsEmpty())
-                               continue;
+                       std::ostringstream msgbuf2;
+                       msgbuf2 << "Applying service template '" << rule.GetTemplate() << "' to host '" << host->GetName() << "' for rule " << rule.GetDebugInfo();
+                       Log(LogDebug, "icinga", msgbuf2.str());
 
                        std::ostringstream namebuf;
                        namebuf << host->GetName() << "!apply!" << rule.GetTemplate();