Skip to content

collectors ZookeeperCollector

aseev-xx edited this page Nov 24, 2017 · 5 revisions

ZookeeperCollector

Collect zookeeper stats. ( Modified from memcached collector )

Dependencies

  • subprocess
  • Zookeeper 'mntr' command (zookeeper version => 3.4.0)

Example Configuration

ZookeeperCollector.conf

    enabled = True
    hosts = localhost:2181, app-1@localhost:2181, app-2@localhost:2181, etc

TO use a unix socket, set a host string like this

    hosts = /path/to/blah.sock, app-1@/path/to/bleh.sock,

Options - Generic Options

Setting Default Description Type
byte_unit byte Default numeric output(s) str
enabled False Enable collecting these metrics bool
hosts localhost:2181, List of hosts, and ports to collect. Set an alias by prefixing the host:port with alias@ list
measure_collector_time False Collect the collector run time in ms bool
metrics_blacklist None Regex to match metrics to block. Mutually exclusive with metrics_whitelist NoneType
metrics_whitelist None Regex to match metrics to transmit. Mutually exclusive with metrics_blacklist NoneType
publish Which rows of 'status' you would like to publish. Telnet host port' and type stats and hit enter to see the list of possibilities. Leave unset to publish all.

Example Output

servers.hostname.zookeeper.zk_outstanding_requests 0
servers.hostname.zookeeper.zk_approximate_data_size 660647
servers.hostname.zookeeper.zk_max_latency 370
servers.hostname.zookeeper.zk_avg_latency 6
servers.hostname.zookeeper.zk_watch_count 158
servers.hostname.zookeeper.zk_num_alive_connections 10
servers.hostname.zookeeper.zk_open_file_descriptor_count 47
servers.hostname.zookeeper.zk_packets_sent 156612
servers.hostname.zookeeper.zk_packets_received 156539
servers.hostname.zookeeper.zk_min_latency 0
servers.hostname.zookeeper.zk_ephemerals_count 80
servers.hostname.zookeeper.zk_znode_count 7890
servers.hostname.zookeeper.zk_max_file_descriptor_count 4096
servers.hostname.zookeeper.zk_followers 4                      - only exposed by the Leader
servers.hostname.zookeeper.zk_pending_syncs 0                  - only exposed by the Leader
servers.hostname.zookeeper.zk_synced_followers 4               - only exposed by the Leader

This file was generated from the python source

Please edit the source to make changes

Clone this wiki locally