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 asclientPort
,dataDir
,tickTime,
and so on.cons
: This
Get Apache ZooKeeper Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.