You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by alexbb <gi...@git.apache.org> on 2017/12/05 18:49:09 UTC
[GitHub] zookeeper pull request #425: Add keys for the Zxid from the stat command
Github user alexbb commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/425#discussion_r155040839
--- Diff: src/contrib/monitoring/check_zookeeper.py ---
@@ -169,11 +169,16 @@ def __init__(self, host='localhost', port='2181', timeout=1):
def get_stats(self):
""" Get ZooKeeper server stats as a map """
data = self._send_cmd('mntr')
+ stat = self._parse_stat(self._send_cmd('stat'))
if data:
- return self._parse(data)
+ mntr = self._parse(data)
+ missing = ['zk_zxid', 'zk_zxid_counter', 'zk_zxid_epoch']
--- End diff --
Because the rest of the stat output is already present in the mntr output. Previously for servers that support the mntr command the script wouldn't run stat at all: I only added it because the zxid info is not in mntr.
---