Skip to content

Commit

Permalink
Merge pull request #16 from signalfx/SWAT-4311
Browse files Browse the repository at this point in the history
Add zk_peer_state translation
  • Loading branch information
dloucasfx authored Apr 22, 2022
2 parents 0834baa + adb8821 commit 8c4ec9e
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 @@ -101,6 +101,9 @@ def _get_mntr_stats(self):
key, value = self._parse_line(line)
if key == "zk_server_state":
result["zk_is_leader"] = int(value != "follower")
# any value of type string, other than zk_is_leader and zk_version, will be skipped
elif key != "zk_version" and isinstance(value, str):
collectd.debug("zookeeper plugin: key: %s value: key: %s not supported" % (key, value))
else:
result[key] = value
except ValueError:
Expand Down

0 comments on commit 8c4ec9e

Please sign in to comment.