icinga2 icon indicating copy to clipboard operation
icinga2 copied to clipboard

Multiple downtime definitions bring undesired effect

Open danielmoser96 opened this issue 2 years ago • 2 comments

Bug Description

When we use the definition of downtimes (via Icinga Director) we sometimes have the case that we need to specify multiple time windows. Like in the example below for Friday. However, only the downtime entered in the first place is activated. So currently a problem at 20:30 has led to an alarm.

apply ScheduledDowntime "Server_*" to Host {
    author = "Admin"
    comment = "Downtime Server"
    fixed = true
    assign where match("Server_*", host.name)
    ranges = {
        "friday" = "22:00-22:45,20:25-21:15"
        "monday" = "22:00-22:45"
        "saturday" = "22:00-22:45"
        "sunday" = "22:00-22:45"
        "thursday" = "22:00-22:45"
        "tuesday" = "22:00-22:45"
        "wednesday" = "22:00-22:45"
    }
}

Expected behavior

Multiple downtimes per day should be created.

Our Environment

  • Version used (icinga2 --version): icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.6-1)
  • Operating System and version: Red Hat Enterprise Linux Server 7.9
  • Enabled features (icinga2 feature list): api checker command ido-mysql influxdb livestatus mainlog notification
  • Icinga Web 2 version and modules (System - About): 2.11.2

danielmoser96 avatar Nov 23 '22 14:11 danielmoser96

Not sure if it's the same issue, but also below does not have the desired effect. Only last schedule "downtime-tuesday" is applied, not both.

apply ScheduledDowntime "service-downtime" to Service { import "downtime-monday" import "downtime-tuesday"

assign where ... }

Version used (icinga2 --version): icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.6-1)

efthymiosc avatar Dec 08 '22 07:12 efthymiosc

Hello Daniel!

Do you consider ordering them ascending a reasonable workaround (and a readability improvement)?

Al2Klimov avatar Feb 07 '23 16:02 Al2Klimov