]> granicus.if.org Git - icinga2/commitdiff
Docs: Add more Timeperiod examples
authorNicole Lang <nicole.lang@netways.de>
Fri, 30 Sep 2016 09:41:32 +0000 (11:41 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 30 Sep 2016 12:57:49 +0000 (14:57 +0200)
fixes #12834

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
doc/8-advanced-topics.md

index 45d1b4e8c4a5eebcc18cb725ce529b54ce0b4508..a123da3a531bf1d8b6fb7b19d590a0608431707a 100644 (file)
@@ -196,8 +196,36 @@ create a new timeperiod named `workhours` defining a work day from
       }
     }
 
-Use the `period` attribute to assign time periods to
-`Notification` and `Dependency` objects:
+Furthermore if you wish to specify a notification period across midnight,
+you can define it the following way:
+
+    object Timeperiod "across-midnight" {
+      import "legacy-timeperiod"
+
+      display_name = "Nightly Notification"
+      ranges = {
+        "saturday" = "22:00-24:00"
+        "sunday" = "00:00-03:00"
+      }
+    }
+
+Below you can see another example for configuring timeperiods across several
+days, weeks or months. This can be useful when taking components offline
+for a distinct period of time.
+
+    object Timeperiod "standby" {
+      import "legacy-timeperiod"
+
+      display_name = "Standby"
+      ranges = {
+        "2016-09-30 - 2016-10-30" = "00:00-24:00"
+      }
+    }
+
+Please note that the spaces before and after the dash are mandatory.
+
+Once your time period is configured you can Use the `period` attribute
+to assign time periods to `Notification` and `Dependency` objects:
 
     object Notification "mail" {
       import "generic-notification"