Book Image

Apache ZooKeeper Essentials

By : Saurav Haloi
Book Image

Apache ZooKeeper Essentials

By: Saurav Haloi

Overview of this book

Table of Contents (14 chapters)
Apache ZooKeeper Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Performing Common Distributed System Tasks
Index

Monitoring a ZooKeeper instance


The ZooKeeper service can be monitored in the following two ways:

  • Monitoring of health and status using a set of four-letter words

  • Using Java Management Extensions capabilities built into ZooKeeper

Four-letter words

ZooKeeper responds to a small set of commands, each being composed of four letters. These commands can be issued through telnet or nc at the client port. The main objective of these commands is to provide a simple mechanism to check health of the server or diagnose any problems.

The following are the four-letter words supported by ZooKeeper services at the time of writing this book:

  • conf: This print details about server configuration parameters such as clientPort, dataDir, tickTime, and so on.

  • cons: This lists the full connection/session details for all clients connected to this server.

  • crst: This resets connection/session statistics for all connections.

  • dump: This lists the outstanding sessions and ephemeral nodes. This only works on the leader.

  • envi...