How to use nagios to monitor Zookeeper nodes

monitoringnagioszookeeper

Sorry this may be a basic question, but I am new to both nagios, and zookeeper.

My company has an application that uses zookeeper to track job status, by creating/destroying nodes. I need to be able to monitor that the number of nodes is always 2*number of wokers or less, is there a plugin that can do this already for nagios? If so which one and how would I configure it for that?

Thank you,

Best Answer

There are some ZooKeeper checks on Nagios Exchange and Monitoring Exchange.

I don't see anything that mentions checking for a specific number of nodes, but you could use one of these as a starting point. (This will probably require hacking some perl or python.)

  1. https://github.com/andreisavu/zookeeper-monitoring
  2. http://exchange.nagios.org/index.php?option=com_mtree&task=search&Itemid=74&searchword=zookeeper

The first link indicates that there are monitoring scripts included with ZooKeeper, in the contrib directory.