I'd like to execute a homemade script every time a check is made and for all states (OK, Up, Down, Critical, Warning, Unknown).
So I looked the Notification and Event objets and see if they could help me. However I can't manage to have what I want.
Moreover, in the documentation it's written that :
If the host/service is located on a client as command endpoint the event command will be executed on the client itself (similar to the check command).
Unfortunately, I'm using Icinga2 in a distributed env. with many clients. Is it still possible to execute event commands only on the master ?
Basicaly, what I want to do is to log every results in a SQL database. Do you have some idea ?