I have setup icinga in ha master with one db node, and two masters, as in the ‘Icinga2 Distributed Monitoring’ described Setup works well, and master role and db connection are changed after a few seconds as expected.
My problem is, that the master2 always gets active and master1 pauses his IDO connection.
But I think master01 should keep his connection, also when master2 gets back online.
Is there an option that can affect this behave?
Unfortunately the feature does not stick to one node after switching, but will always fallback to the node it thinks it should run on. So no mistake on your side, just designed in this way.
Okay, that sounds like I already thought. But what are the parameters which let cinga think where it should run, in this case master1 was the initial installed master, and is also the more powerfull one of both
It is a hash build on object names, so servername and name of the feature object have an impact on it. But the hash will be rebuild always when a change to the configuration happens, so I am not sure if tinkering with the name would help as a permanent solution even if I would see this as a valid option instead of some kind of gambling!