Icinga2 critical/warning combine two services on two different hosts


(Otto Brandstaetter) #1

Hi,

I have written a small script what checks the status of a webservice on two of our servers.
Those servers are behind a load-balancing-server.

As long as one of those server is reachable and working it is reporting activity. As soon as it is not reachable, the second one takes over and vice versa.

Now my check goes to warning/critical state if the service on the host does not report activity within an hour. What is OK.
But I want it to go only warning/critical if the service on BOTH servers did not have any activity within an hour (or whenever).
I know, that I could modify the script to implement this, but are there also possibilities to do this directly in icinga2?

Best regards and thanks in advance,
Otto


#2

The cluster check could be adopted to solve this. I also found this old thread which sounds like what you need.