Auto-Acknowledgement via API - How to run script on Satellite / Master

Hi community!
I’m trying to realize an event handler / event command to auto-acknowledge service problems for a defined time period.
The function is intended to inform the admins about a problem with their services by e-mail (hard state) and keeping the Icinga Web 2 dashboard clean (for defined services only).


  1. Passive check result is sent from a Windows Server :white_check_mark:
  2. In case of a problem an e-mail is sent to the contact group (hard state) :white_check_mark:
  3. An acknowledgement is set for that service via API :question:

I’ve found the script by Carsten aka Mikesch-mp (GitHub - Mikesch-mp/automatic_downtime: Icinga2 eventhandler Script to set an automatic downtime for a host and its services) that is very close to what I’m looking for.

But there are still questions:

  • Is it possible to run the script for setting the acknowledgement on a satellite or master?
  • Do I need to set the command_endpoint for that service manually?
    If so, how do I decide which of the satellites in that zone or which of the masters should run the script and where should it be configured?

Thanks for any advice.


you could update you email script to do that for you:

  • the emails script runs on the icinga-master
  • you add an parameter -autoack
  • it has the service name and the hostname
  • it could make an api call
  • Icinga2 Api - Icinga 2

That’s more than amazing Nick!
Thanks for opening my eyes.
I just didn’t see the solution right in front of me. :blush: