CollectD ZooKeeper plugin
Requires ZooKeeper 3.4.0 or greater in order to use the
TODO: if support for earlier versions is needed, add
available in since 3.3.0, or
stat (fetches extra uneeded data but
- Checkout this repository somewhere on your system accessible by
collectd; for example as
- Configure the plugin (see below).
- Restart collectd.
Add the following to your collectd config:
<LoadPlugin "python"> Globals true </LoadPlugin> <Plugin python> ModulePath "/usr/share/collectd/collectd-zookeeper" Import "zk-collectd" <Module "zk-collectd"> Hosts "localhost" Port 2181 </Module> # You may have as many Module sections as you want <Module "zk-collectd"> Hosts "localhost" Port 2182 Instance "dev" </Module> </Plugin>
All metrics are reported with the
plugin:zookeeper dimension. Additionally,
if you specify an
Instance in your
Module configuration block, its value
will be reported as the
zk_is_leader is a synthetic metric which is 0 if the contents of zk_server_state is 'follower'. zk_service_health is a synthetic metric which tracks if service is running and servicing requests.
Available under the terms of the Apache Software License v2. See LICENSE file for details.