Host downtime dependency in Director

This forum was archived to /woltlab and is now in read-only mode.
  • Hi,

    Since the newest release Icinga Director supports "dependencies" (though it says this feature is still experimental).

    Currently, the feature is not yet documented, or at least I haven't found anything in the docu.

    Does anyone know how to implement the following config: Director creates automatically host objects based on data in LDAP. The Downtime of host objects is also scheduled automatically based on LDAP Attributes (it is not done by Director, but it is done by an external script). The checking of services belonging to host objects in downtime should be disabled/paused as long as the host downtime is defined.

    I am Aware of that Icinga2 stops alarming of services belonging to a host that is "down" but it is different, as I need to disable checking and alarming for hosts that might be "up", but have a downtime scheduled.

    Does anyone have an idea how to solve this?

  • I don't think that dependencies will solve your question. You rely on the fact that the host is in a downtime which should disable service checks. Especially if that host is in an UP state where dependencies won't help much.


    Since you're already using a script to schedule such downtimes, add a secondary call to the API which disables the checks for all services belonging to this host.


    A yet more simple approach would be to also schedule the same downtime for the same host, since this is probably what you want - no notifications for services, no matter on the host state.

  • Hi Michi,

    Thanks for the answer. I thought it would be simpler to solve the problem through dependencies, as the removal of downtimes also needs to happen automatically (external script). In this case the script has to handle a large number of service downtimes vs. a few host-downtimes.

    I can modify the script to schedule/remove downtimes for the hosts and all the belonging services.

    Is it what you meant in your last sentence?

  • I adapted my script to schedule/remove downtimes for all services on every host in downtime. The problem, I haven't found a way to batch create and remove multiple downtimes in a single API request, is it possible? I have to create and remove every single downtime (host & service) schedule in a loop, and it takes a lot more time than if I would have to deal only with host downtimes (30s vs. 4s).

    Is there a way to create and remove multiple downtimes in a single API call?

  • You may remove a downtime for all services matching a specific host. But still, it is two api calls - one for the Host type, and one for the Service type.