This article will help you get the Zookeeper plugin for sd-agent configured and returning metrics
Installing the zookeeper plugin package
Install the zookeeper plugin on Debian/Ubuntu:
sudo apt-get install sd-agent-zookeeper
Install the zookeeper plugin on RHEL/CentOS:
sudo yum install sd-agent-zookeeper
Read more about agent plugins.
Configuring the agent to monitor Apache ZooKeeper
1. Configure /etc/sd-agent/conf.d/zk.yaml
init_config: instances: - host: localhost port: 2181 timeout: 3
2. Restart the agent
sudo /etc/init.d/sd-agent restart
sudo systemctl restart sd-agent
Verifying the configuration
Execute info to verify the configuration with the following:
sudo /etc/init.d/sd-agent info
If the agent has been configured correctly you'll see an output such as:
zookeeper ----- - instance #0 [OK] - Collected * metrics
You can also view the metrics returned with the following command:
sudo -u sd-agent /usr/share/python/sd-agent/agent.py check zk
Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the zookeeper metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.
|zookeeper.bytes_received || byte / second |
|zookeeper.bytes_sent || byte / second |
|zookeeper.connections || connection / second |
|zookeeper.latency.avg || millisecond / second |
|zookeeper.latency.max || millisecond / second |
|zookeeper.latency.min || millisecond / second |
|zookeeper.nodes || / second |
|zookeeper.outstanding_requests || request / second |
The number of packets received.
| packet / second |
The number of packets sent.
| packet / second |
The exception rate seen by the Server Density Agent when trying to collect stats.
| error / None |
The rate of timeouts the Datadog Agent received when trying to collect stats.
| occurrence / None |
|zookeeper.zxid.count || / second |
|zookeeper.zxid.epoch || / second |
Please refer to the metrics conversion document to map old metrics names to the new metric names.