ZooKeeper Plugin

ZooKeeper is a centralized server used for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. For more information visit zookeeper.apache.org.

Discovery

Even if the Zookeeper plugin is not configured, Stackdriver Monitoring will discover ZooKeeper services running in your Cloud Platform project by:

  • searching instance names for zookeeper
  • checking for ports opened to 2181 via firewall rules

The services discovered are displayed on the ZooKeeper Services page in the Resources menu. After you install the monitoring agent and configure the ZooKeeper plugin on your instances, Stackdriver Monitoring populates the ZooKeeper Services page with inventory and metrics.

Configuring Stackdriver Monitoring to monitor ZooKeeper

After you install the monitoring agent, use the following instructions to configure the ZooKeeper plugin on your instances.

Enabling the ZooKeeper monitoring plugin

Stackdriver Monitoring supports monitoring ZooKeeper version 3.4.0 and higher. The configuration files contain instructions on handling non-standard ports.

On your VM instance, download zookeeper.conf from the GitHub configuration repository and place it in the directory /opt/stackdriver/collectd/etc/collectd.d/:

(cd /opt/stackdriver/collectd/etc/collectd.d/ && curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/zookeeper.conf)

After adding the configuration file, restart the monitoring agent by running the following command:

sudo service stackdriver-agent restart

Information on other plugin configuration options can be found at collectd.org.

What is monitored

The ZooKeeper plugin monitors the following metrics:

  • Request latency (min, max, avg)
  • Packets sent and received
  • Number of connections
  • Outstanding requests
  • Znode count
  • Watch count
  • Ephemeral count
  • Approximate data size
  • Number of followers: only in a leader's cluster
  • Number of synced followers: only in a leader's cluster
  • Pending syncs

Send feedback about...

Stackdriver Monitoring