Skip to content

Commit

Permalink
Provide informative error about mntr requirement (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmfitzpatrick authored Jan 20, 2022
1 parent 7720d7a commit 0834baa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zk-collectd.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def _get_mntr_stats(self):
if response == "This ZooKeeper instance is not currently serving requests\n":
return {"zk_service_health": 0, "zk_version": "UNKNOWN"}

if response == "mntr is not executed because it is not in the whitelist.\n":
raise RuntimeError("Unable to monitor ZooKeeper instance without being able to execute 'mntr' 4lw command")

for line in response.splitlines():
try:
key, value = self._parse_line(line)
Expand Down

0 comments on commit 0834baa

Please sign in to comment.