Remote Alert Handler to run ansible playbook

Hi, I am trying to figure out if it is possible to setup a Remote Alert Handler to run an ansible playbook on my ansible host rather than to run a script on the host that has raised the alert.
We have a mixture of Linux, Solaris & Windows hosts and it looks like the remote alert handler can only be configured for linux hosts. I am hoping to get around this issue but the alert handler ssh’ing to my ansible host (linux) and running a playbook on there. Does anyone know if this is possible?

The builtin “remote alert handler” will ssh into the host that caused the alert.

This does not seem to be your use case.

You will have to write your own alert handler that always sshes into your “ansible host” and then executes the playbook with the hostname in question.

1 Like

Leaving the Checkmk ecosystem, you could look at Red Hat Ansible Automation Platform - Event-Driven Ansible which to my knowledge is also available in AWX.

We use EDA as @robin.gierse refers to as well for this.
We wrote a custom event notification scripts that sends notifications to a Kafka message bus, and EDA have direct support for reading Kafka events.

Its super easy as you can include host and service labels and use them in your playbooks.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.