Icinga/icingaweb2

Downtimes are not applied for childhosts

Opened this issue · 12 comments

Describe the bug

Downtimes are not applied for childhosts with these settings checked

  • All Services: checked
  • Child Hosts: Schedule triggered downtime for all child hosts

To Reproduce

Provide a link to a live example, or an unambiguous set of steps to reproduce this issue. Include configuration, logs, etc. to reproduce, if relevant.

  1. open satellite host
  2. click on downtime
  3. enter provided settings
  4. click schedule downtime

Expected behavior

downtime is applied for satellite host, all childhosts and services

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga Web 2 version and modules (System - About):
    • 2.12.1
  • Web browser used:
    • chrome Version 113.0.5672.92
  • Icinga 2 version used (icinga2 --version):
    • icinga2 - The Icinga 2 network monitoring daemon (version: r2.14.1-1)
  • PHP version used (php --version):
    • 7.3.33
  • Server operating system and version:
    • System information:
      Platform: CentOS Linux
      Platform version: 7 (Core)
      Kernel: Linux
      Kernel version: 3.10.0-1160.102.1.el7.x86_64
      Architecture: x86_64

Hi,

what do you mean by satellite host? The parent host? If I schedule a downtime there, with the necessary options, the child hosts get one too. So, works for me.

Please share the dependency configuration.

Hi,

yes I mean the parent host. In our configuration only the parent host and its services get a downtime.

Configuration:

zones.conf
object Endpoint "satellite.xxx.xxx" {
host = "satellite.xxx.xxx"
}

object Zone "EH-Test" {
endpoints = [ "satellite.xxx.xxx" ]
parent = "master"
}

object Zone "master" {
endpoints = [ "master.xxx.xxx" ]
}

child.conf
object Endpoint "child.xxx.xxx" { }

object Zone "child.xxx.xxx" {
endpoints = ["child.xxx.xxx"]
parent = "EH-Test"
}

What you've posted is the zone configuration. What I've meant, is the dependency configuration of the hosts in question. If there's any, because if there's none, it explains what you're experiencing. 😉

Indeed I did not configure a dependency configuration.

I just configured one.
A downtime for child hosts is working now but the services of the child host do not get a downtime.

I tried to configure a service dependency with the same parent_host_name as the host dependency but had no success.

Configuration:

apply Dependency "p-host" to Host {
parent_host_name = "satellite.xxx.xxx"

assign where host.vars.env == "prod"
ignore where host.name == "satellite.xxx.xxx"
}

apply Dependency "p-service" to Service {
parent_host_name = "satellite.xxx.xxx"
parent_service_name = "check_hostalive"

assign where host.vars.env == "prod"
ignore where host.name == "satellite.xxx.xxx"
}

but the services of the child host do not get a downtime.

For this you need to tick the box saying All Services

I ticked the box saying All Services but only the services on the parent host get a downtime and not the services of the child hosts.

Works for me:
image

object Host "switch" {
    check_command = "dummy"
    check_interval = 5m
    retry_interval = 1m

    vars.dummy_state = 2
}

object Host "pc1" {
    check_command = "dummy"
    check_interval = 5m
    retry_interval = 1m

    vars.dummy_state = 2
}

object Service "pc1-disk" {
    check_command = "dummy"
    check_interval = 5m
    retry_interval = 1m

    host_name = "pc1"

    vars.dummy_state = 3
}

object Dependency "pc1-switch" {
  parent_host_name = "switch"

  child_host_name = "pc1"

  states = [ Up ]

  disable_checks = true
}
  1. Do you have a working example with apply rules too?
  2. Where did you find that view to show the children of a host?
  1. No. But I don't think that this makes a difference anyway.
  2. That's from Icinga DB Web, the detail view of the downtime on the parent host

Hi, I installed Icinga DB Web now.
The downtime including services of the child hosts is working now but only with the Icinga DB Web UI.

With the default monitoring UI module it is still not working.

What is not working?

There's no difference how monitoring and Icinga DB Web create downtimes. Both do that by contacting the Icinga 2 API, if it works with Icinga DB Web, it should with monitoring as well. The only difference is how parent/child relations are visualized, as that's only done in Icinga DB Web.

When I create a downtime via the monitoring module, the child hosts receive a downtime but not the services of the child hosts, even if I check the box "All Services".
If I create the downtime via Icinga DB Web, the services of the child hosts also get a downtime.