endpoint 相关命令 endpoint 相关命令 描述 endpoint hashkv 查看 --endpoints
指定成员的 endpoint 的 hash 值 endpoint health 查看 --endpoints
指定成员的健康状态 endpoint status 查看 --endpoints
指定成员的状态信息
etcdctl endpoint --help
NAME:
endpoint - Endpoint related commands
USAGE:
etcdctl endpoint <subcommand> [flags]
API VERSION:
3.4
COMMANDS:
hashkv Prints the KV history hash for each endpoint in --endpoints
health Checks the healthiness of endpoints specified in `--endpoints` flag
status Prints out the status of endpoints specified in `--endpoints` flag
OPTIONS:
--cluster[=false] use all endpoints from the cluster member list
-h, --help[=false] help for endpoint
$ etcdctl endpoint hashkv --cluster -w table
+---------------------------+------------+
| ENDPOINT | HASH |
+---------------------------+------------+
| http://10.100.0.100:2379 | 1777649260 |
+---------------------------+------------+
$ etcdctl endpoint status --cluster -w table
+---------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
+---------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
| http://10.100.0.100:2379 | 65231cb33388f16d | 3.4.14 | 25 kB | true | false | 7 | 61 | 61 | |
+---------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
- endpoint health 示例
$ etcdctl endpoint health --cluster -w table +---------------------------+--------+------------+-------+ | ENDPOINT | HEALTH | TOOK | ERROR | +---------------------------+--------+------------+-------+ | http://10.100.0.100:2379 | true | 9.196236ms | | +---------------------------+--------+------------+-------+ ```