Schedule Downtime for Host not working

Hi,
I have a strange Problem. I try to schedule a Downtime every day between 22:00 and 06:00 for a Host.
I read the Problem on Schedule downtimes for hosts and try it, but the Downtime is not set :frowning:
Any idea whats wrong here?

host.conf

 ...
object Host "evoko02" {
  import "generic-host"
  import "evokos"
  display_name = "Evoko Europe"
  address = "xxx.xxx.xxx.xxx"
 ...
}

templates.conf

...
template Host "evokos" {  
  vars.os    = "evoko"
  vars.group = "evokos"
  vars.notification["mail"] = {
    groups = [  "admin"  ]
  }
}

downtimes.conf

apply ScheduledDowntime "evoko-downtime" to Host {
  author = "unixadmin"
 comment = "Scheduled downtime for Evokos"

 ranges = {
   monday     =  "22:00-06:00"
   tuesday    =  "22:00-06:00"
   wednesday  = "22:00-06:00"
   thursday   = "22:00-06:00"
   friday     = "22:00-06:00"
   saturday   = "22:00-06:00"
   sunday     =  "22:00-06:00"
 }
 
 assign where host.vars.os == "evoko"
}

Which version of icinga are you using?

https://icinga.com/docs/icinga2/latest/doc/08-advanced-topics/#across-midnight

If you’re on 2.11 or higher, what you’re trying should work, but if you’re
below 2.11, you need to split the time range at midnight and specify both
days.

Antony.

I use

icinga2 - The Icinga 2 network monitoring daemon (version: r2.11.4-1)

And I think also it shouöd work but it doesn’t work :thinking:
And I don`t know why.

Very strange

Please try adding quotes around the day like below.

 ranges = {
   "monday" = "22:00-06:00"
}

Regards
Alex

2 Likes

Thats it :man_facepalming:
Second time I miss it :innocent:

Thanks for the hint :handshake:

1 Like