predic8 / activemq-nagios-plugin

Nagios Plugins for Monitoring the Apache ActiveMQ Broker
Apache License 2.0
15 stars 19 forks source link

Using this check with ZooKeeper managed cluster #11

Open Rumbles opened 9 years ago

Rumbles commented 9 years ago

Hi,

This isn't an issue with your script as such.

We have set up an activemq (3 nodes) cluster using ZooKeeper to manage availability, and we would like to get these hosts monitored using nagios. The issue is that when the host running the checks isn't the active host you get the following returned:

ACTIVEMQHEALTH UNKNOWN - ERROR: Fetching network FAILED: [Errno socket error] [Errno 111] Connection refused unknown: ERROR: Fetching network FAILED: [Errno socket error] [Errno 111] Connection refused

I'm trying to figure out the best way to handle this situation, I know I can set up each host to check the status, and 2/3 will always show as having an error, while the active host will show as okay. This clearly isn't ideal as you would always have 2 hosts showing issues when the cluster is healthy.

My colleague has suggested re-writing the check to test itself as well as the other hosts in the cluster, if one returns as okay, the check is okay, which is probably going to be the way we go.

I was wondering if you had any other suggestions about how best to handle this situation.

predic8 commented 9 years ago

Good idea to check a whole cluster. Have a look at the phyton script of the plugin. It should be easy to add the functionality there with a couple of lines.