i am trying to configure the downtime.conf that way. i could configure it in the timeperiod.conf and exlude but i want to try this one.
i want that a downtime be set every month from the first until the fifth for this specific service
i could use “service.vars.backup_downtime” but at the moment i am testing and hard coding it
maybe i should try commas instead of “-” between Days ?
apply ScheduledDowntime "backup-downtime" to Service {
author = "icingaadmin"
comment = "Scheduled downtime for backup"
ranges = {
"january 1 - january 5" = "00:00-24:00"
"february 1 - february 5" = "00:00-24:00"
"march 1 - march 5" = "00:00-24:00"
"april 1 - april 5" = "00:00-24:00"
"may 1 - may 5" = "00:00-24:00"
"june 1 - june 5" = "00:00-24:00"
"july 1 - july 5" = "00:00-24:00"
"august 1 - august 5" = "00:00-24:00"
"september 1 - september 5" = "00:00-24:00"
"october 1 - october 5" = "00:00-24:00"
"november 1 - november 5" = "00:00-24:00"
"december 1 - december 5" = "00:00-24:00"
}
assign where service.name == "Backup"
}
is this even possible to be configured this way ?
did not apparently work, what am i missing ?
I would have defined it the same way.
And it works
apply ScheduledDowntime "backup-downtime" to Service {
author = "icingaadmin"
comment = "Scheduled downtime for backup"
ranges = {
"december 1 - december 9" = "00:00-24:00"
}
assign where service.name == "cpu" && host.name == "ma01"
}
apply ScheduledDowntime "backup2-downtime" to Service {
author = "icingaadmin2"
comment = "Scheduled another downtime for backup"
ranges = {
"december 10 - december 19" = "00:00-24:00"
}
assign where service.name == "cpu" && host.name == "ma01"
}
today til tomorrow:
tomorrow til 8th:
10th to 11th:
What makes you think that it didn’t work?
Did the number of ScheduledDowntimes in the output of icinga daemon -C increase?
You might not see the downtimes in the webinterface atm, as you are past your time range.