ITRS-Group / monitor-merlin

Module for Effortless Redundancy and Loadbalancing In Naemon
https://itrs-group.github.io/monitor-merlin/
GNU General Public License v2.0
22 stars 14 forks source link

Query Handler does not return nodeinfo in a 3 node cluster #149

Closed nook24 closed 1 year ago

nook24 commented 1 year ago

Hi,

i have created a cluster out of 3 peers. Basicaly the cluster is working and executing checks. How ever, as soon as I join a third peer to the setup, the Naemon query Handler will stuck on #merlin nodeinfo.

As soon as i stop Naemon and the Merlin daemon on Peer1 (or Peer2), #merlin nodeinfo reports back as expected, and show 2 systems active and one inactive.

jacobbaungard commented 1 year ago

That sounds odd. I assume the QH is correctly answering other queries?

Do you have the mon python tool available or did you compile from scratch?

nook24 commented 1 year ago

Turns out, the query handler is responding as expected. I can not uses the mon tool as it is depending on python2 which I don't have.

Turns out my PHP based workaround is not reading the whole result, and my try with Go just reads forever. If i used good old socat I got everything i need:

printf "#merlin nodeinfo\0" | socat  UNIX-CONNECT:/opt/naemon/var/rw/naemon.qh -