Monitoring Apache ZooKeeper

Configure the Server Density agent to monitor your Apache ZooKeeper service to:

• Collect metrics to monitor performance, requests, connections etc
• Identify overall server slowdowns caused by service

Monitored metrics

  • Zxid count
  • Zxid epoch
  • Maximum latency
  • Average latency
  • Minimum latency
  • Connections
  • Outstanding requests
  • Nodes
  • Bytes received
  • Bytes sent

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

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:

zk
-----
 - instance #0 [OK]
 - Collected 8 metrics & 0 events

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check zk


Configuring Graphs
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 Apache ZooKeeper metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Further reading

We have a detailed blog post about how to monitor ZooKeeper.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.