Downtime 24/7

Hello,

I want to plan a downtime 24/7 that is active when I configure a new host. Reason is I don’t want it to spam the mailboxes before its ready and the messages can be trusted.

apply ScheduledDowntime "initial-downtime" to Host {
   author = "icingaadmin"
   comment = "Ininitale downtime für die Installation"

   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"
   }

   assign where host.vars.initial == true
}

What happens is that I get a message “downtime start” at 00:00 and a message “downtime end” 00:01 at the same day. If I understand correctly, the downtime is only 1 minute long.


icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.5-1)
System information:
Platform: Red Hat Enterprise Linux Server
Platform version: 7.9 (Maipo)
Kernel: Linux
Kernel version: 3.10.0-1160.15.2.el7.x86_64
Architecture: x86_64

I think the notifications are misleading and the end is from the day before the one for the start.

The ScheduledDowntime will create a downtime for every range specified, so always for a day. This has the advantage in your case of not needing to delete the downtime when removing the initial as it will be gone next day, but I am not sure if I would prefer a traditional downtime set via script for this case.

Yea, you may be right… Thanks :slight_smile: