You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when i verify it from the cli, it seems that the exclusion is not working :
@ icinga2 object list -t timeperiod -n "non-workhours"
Object 'non-workhours' of type 'TimePeriod':
% declared in '/etc/icinga2/zones.d/global/timeperiod/non-workhours.conf', lines 1:0-1:32
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13239
Created by kowalskimn on 2016-11-18 09:09:07 +00:00
Assignee: kowalskimn
Status: Closed (closed on 2016-12-07 21:22:52 +00:00)
Target Version: (none)
Last Update: 2016-12-07 21:22:52 +00:00 (in Redmine)
I have defined a timeperiod like so :
@object TimePeriod "workhours" {
import "legacy-timeperiod"
display_name = "Typical work hours"
ranges = {
"monday" = "08:00-16:00"
"tuesday" = "08:00-16:00"
"wednesday" = "08:00-16:00"
"thursday" = "08:00-16:00"
"friday" = "08:00-16:00"
}
}
@
now i have defined another one using the exclusion logic
@object TimePeriod "non-workhours" {
import "legacy-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"
//no sunday
}
// except for work hours
excludes = [ "workhours" ]
}
@
However, when i verify it from the cli, it seems that the exclusion is not working :
@ icinga2 object list -t timeperiod -n "non-workhours"
Object 'non-workhours' of type 'TimePeriod':
% declared in '/etc/icinga2/zones.d/global/timeperiod/non-workhours.conf', lines 1:0-1:32
__name = "non-workhours"
display_name = "non-workhours"
excludes = [ "workhours" ]
% = modified in '/etc/icinga2/zones.d/global/timeperiod/non-workhours.conf', lines 18:2-18:27
includes = [ ]
name = "non-workhours"
package = "_etc"
prefer_includes = false
% = modified in '/etc/icinga2/zones.d/global/timeperiod/non-workhours.conf', lines 6:2-6:24
ranges
% = modified in '/etc/icinga2/zones.d/global/timeperiod/non-workhours.conf', lines 10:2-17:2
friday = "00:00-24:00"
monday = "00:00-24:00"
saturday = "00:00-24:00"
thursday = "00:00-24:00"
tuesday = "00:00-24:00"
wednesday = "00:00-24:00"
templates = [ "non-workhours", "legacy-timeperiod" ]
% = modified in '/etc/icinga2/zones.d/global/timeperiod/non-workhours.conf', lines 1:0-1:32
% = modified in 'icinga-itl.conf', lines 23:2-23:56
type = "TimePeriod"
update
% = modified in 'icinga-itl.conf', lines 24:3-24:37
type = "Function"
vars = null
zone = "global"
@
The text was updated successfully, but these errors were encountered: