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
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 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...