Class Commands.MonitorCommand
- java.lang.Object
-
- org.apache.zookeeper.server.admin.CommandBase
-
- org.apache.zookeeper.server.admin.GetCommand
-
- org.apache.zookeeper.server.admin.Commands.MonitorCommand
-
- All Implemented Interfaces:
Command
- Enclosing class:
- Commands
public static class Commands.MonitorCommand extends GetCommand
Some useful info for monitoring. Returned map contains: - "version": String server version - "avg_latency": Long - "max_latency": Long - "min_latency": Long - "packets_received": Long - "packets_sents": Long - "num_alive_connections": Integer - "outstanding_requests": Long number of unprocessed requests - "server_state": "leader", "follower", or "standalone" - "znode_count": Integer - "watch_count": Integer - "ephemerals_count": Integer - "approximate_data_size": Long - "open_file_descriptor_count": Long (unix only) - "max_file_descriptor_count": Long (unix only) - "fsync_threshold_exceed_count": Long - "non_mtls_conn_count": Long - "non_mtls_remote_conn_count": Long - "non_mtls_local_conn_count": Long - "followers": Integer (leader only) - "synced_followers": Integer (leader only) - "pending_syncs": Integer (leader only)
-
-
Constructor Summary
Constructors Constructor Description MonitorCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandResponse
runGet(ZooKeeperServer zkServer, Map<String,String> kwargs)
Run this command for HTTP GET request.-
Methods inherited from class org.apache.zookeeper.server.admin.GetCommand
runPost
-
Methods inherited from class org.apache.zookeeper.server.admin.CommandBase
getAuthRequest, getNames, getPrimaryName, initializeResponse, isServerRequired
-
-
-
-
Method Detail
-
runGet
public CommandResponse runGet(ZooKeeperServer zkServer, Map<String,String> kwargs)
Description copied from interface:Command
Run this command for HTTP GET request. Commands take a ZooKeeperServer, String-valued keyword arguments and return a CommandResponse object containing any information constituting the response to the command. Commands are responsible for parsing keyword arguments and performing any error handling if necessary. Errors should be reported by setting the "error" entry of the returned map with an appropriate message rather than throwing an exception.- Parameters:
zkServer
- ZooKeeper serverkwargs
- keyword -> argument value mapping- Returns:
- CommandResponse representing response to command containing at minimum: - "command" key containing the command's primary name - "error" key containing a String error message or null if no error
-
-