]> granicus.if.org Git - icinga2/commitdiff
Improve timeperiods documentation
authorJean Flach <jean-marcel.flach@netways.de>
Tue, 13 Oct 2015 11:46:31 +0000 (13:46 +0200)
committerJean Flach <jean-marcel.flach@netways.de>
Tue, 13 Oct 2015 11:46:39 +0000 (13:46 +0200)
refs #10352

doc/6-object-types.md

index 9db0b70f3c79a2c29e03ae002fb086c9ac1734d8..d68a77be53e1cd248a76db4372ad49ce9ff87030 100644 (file)
@@ -1216,24 +1216,47 @@ Configuration Attributes:
 Time periods can be used to specify when hosts/services should be checked or to limit
 when notifications should be sent out.
 
-Example:
+Examples:
 
-    object TimePeriod "24x7" {
+    object TimePeriod "nonworkhours" {
       import "legacy-timeperiod"
 
-      display_name = "Icinga 2 24x7 TimePeriod"
+      display_name = "Icinga 2 TimePeriod for non working hours"
 
       ranges = {
-        monday = "00:00-24:00"
-        tuesday = "00:00-24:00"
-        wednesday = "00:00-24:00"
-        thursday = "00:00-24:00"
-        friday = "00:00-24:00"
+        monday = "00:00-8:00,17:00-24:00"
+        tuesday = "00:00-8:00,17:00-24:00"
+        wednesday = "00:00-8:00,17:00-24:00"
+        thursday = "00:00-8:00,17:00-24:00"
+        friday = "00:00-8:00,16:00-24:00"
         saturday = "00:00-24:00"
         sunday = "00:00-24:00"
       }
     }
 
+    object TimePeriod "exampledays" {
+        import "legacy-timeperiod"
+
+        display_name = "Icinga 2 TimePeriod for random example days"
+
+        ranges = {
+            //We still believe in Santa, no peeking!
+            //Applies every 25th of December every year
+            "december 25" = "00:00-24:00"
+
+            //Any point in time can be specified,
+            //but you still have to use a range
+            "2038-01-19" = "03:13-03:15"
+
+            //Evey 3rd day from the second monday of February
+            //to 8th of November
+            "monday 2 february - november 8 / 3" = "00:00-24:00"
+        }
+    }
+
+
+Additional examples can be found [within the icinga documentation](http://docs.icinga.org/latest/en/objectdefinitions.html#objectdefinitions-timeperiod).
+
 Configuration Attributes:
 
   Name            |Description