DataDog/dd-agent — pull request #1086 by conorbranagan (2014-08-21 13:06:31+00:00)
Title: Add zookeeper service checks.

- 'zookeeper.ruok': Send the `ruok` command to the ZK server. If we get
a response that's 'imok' then the service check is OK. If the response
is something else (which should _not_ happen) we'll give a warning. If
no response because the server is down then we'll send a critical
status.
- 'zookeeper.mode': If `expected_mode` is given in the ZK check config
then we'll check it against the mode we get from the `stat` command
and return a status.

Also refactored the check a bit to make it easier to run more commands
with consistent error handling.