Example:
- TODO
+ object TimePeriod "24x7" inherits "legacy-timeperiod" {
+ display_name = "Icinga 2 24x7 TimePeriod",
+ 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",
+ "saturday" = "00:00-24:00",
+ "sunday" = "00:00-24:00",
+ }
+ }
Attributes:
methods |**Required.** The "update" script method takes care of updating the internal representation of the time period. In virtually all cases you should just inherit from the "legacy-timeperiod" template to take care of this setting.
ranges |TODO
+The `/etc/icinga2/conf.d/timeperiods.conf` file is usually used to define
+timeperiods including this one.
+
+
### <a id="objecttype-consolelogger"></a> ConsoleLogger
Specifies Icinga 2 logging to the console.
--- /dev/null
+/**
+ * Sample timeperiods for Icinga 2 requiring
+ * 'legacy-timeperiod' template from the ITL.
+ */
+
+object TimePeriod "24x7" inherits "legacy-timeperiod" {
+ display_name = "Icinga 2 24x7 TimePeriod",
+ 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",
+ "saturday" = "00:00-24:00",
+ "sunday" = "00:00-24:00",
+ }
+}
+
+object TimePeriod "8x5" inherits "legacy-timeperiod" {
+ display_name = "Icinga 2 8x5 TimePeriod",
+ ranges = {
+ "monday" = "09:00-17:00",
+ "tuesday" = "09:00-17:00",
+ "wednesday" = "09:00-17:00",
+ "thursday" = "09:00-17:00",
+ "friday" = "09:00-17:00",
+ }
+}
+
+object TimePeriod "none" inherits "legacy-timeperiod" {
+ display_name = "Icinga 2 none TimePeriod",
+ ranges = {
+ }
+}
+