The setup we have for the moment is having two masters (one of them is dedicated configuration master). Then there are two satellites paired on each site we are monitoring.
I’m trying to setup some icinga self monitoring on each involved endpoint. In the example we call the masters m1
and m2
.
One of the commands I’m using is the icingacli director health check
command, let’s call the service Icinga Director check. This one I only want to be executed on the m1
endpoint, which is the configuration master.
-
I have set
command_endpoint = m1
in the host template used for them1
host. -
Now both masters are up and the Icinga Director check is executed on
m1
as expected with the following short plugin output:
Icinga Director: everything is fine
-
I bring down the icinga2 daemon on
m1
. -
After a while
m2
has started to run the check which of course ends up with a not so good short plugin output:
The 'director' module does not provide any CLI commands
This since there are no director module installed onm2
.
Is there anyway to make the icinga endpoints to understand that there is only one that should execute this command. If the endpoint that should check it goes down the one that takes over should either become critical since it is wrong command_endpoint
or something like that?
Maybe I should ad that we are doing all objects configuration via Director and want to continue with that
Btw, it would be good if the icingacli director health check
command would exit with exit code 2 instead of 0 if the module is not installed?