Our backup is running between 22:00 and about 05:00 the next day. I could not figure out how to set this in a scheduled downtime with "apply ScheduledDowntime" in icinga2 (r2.4.1-1 on opensuse 42.1).
Just setting 22:00-05:00 gives me an error:
Invalid time range definition '22:00-05:00': Time period segment ends before it begins
The current mechanism uses a service variable backup_downtime which in turn triggers the "apply" rule when not empty:
apply ScheduledDowntime "backup-downtime" to Service {
author = "icingaadmin"
comment = "Scheduled downtime for backup"
ranges = {
monday = service.vars.backup_downtime
tuesday = service.vars.backup_downtime
wednesday = service.vars.backup_downtime
thursday = service.vars.backup_downtime
friday = service.vars.backup_downtime
saturday = service.vars.backup_downtime
sunday = service.vars.backup_downtime
}
assign where service.vars.backup_downtime != ""
}
Somebody an idea? Thanks