There're no cluster level command to show all the members' status/health in V3 #8117
Description
Problem state
In V2, the command etcdctl cluster health
checks all the members' health status. And in V3, there's 1 command, 2 sub-commands to check the member's health status - etcdctl endpoint status
and etcdctl endpoint health
.
However, the V3 commands are difficult to use cause they only check the endpoints' status/health provided by option --endpoints
. It is needed to collect all the endpoints first, and then set into the endpoints option.
There's one issue created #8115 first to implement the feature to collect all the members' status/health.
It is supposed to be the design instead of implementation. I hope there is one command to check the cluster status instead of only the endpoints provided.
$ ETCDCTL_API=3 etcdctl cluster health -w table
+----------------------------------------------+------------------+---------+---------+-----------+-----------+------------+
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | RAFT TERM | RAFT INDEX |
+----------------------------------------------+------------------+---------+---------+-----------+-----------+------------+
| https://test-node-vh8tr-6888.51.test.cn:4001 | d479908fcc05ba8e | 3.0.15 | 8.0 GB | false | 1309 | 229422110 |
| https://test-node-2o9hu-4886.51.test.cn:4001 | b620b4c395187fad | 3.1.8 | 8.0 GB | false | 1309 | 229422110 |
| https://test-node-873t0-8911.51.test.cn:4001 | 829de42e4f2097c4 | 3.1.8 | 8.0 GB | true | 1309 | 229422110 |
| https://test-node-ba93c-3871.51.test.cn:4001 | 2af130f12df09e15 | 3.0.15 | 8.0 GB | false | 1294 | 227711328 |
| https://test-node-xq2sm-5915.51.test.cn:4001 | 5902a07919e43cdf | 3.0.15 | 8.0 GB | false | 1309 | 229422110 |
+----------------------------------------------+------------------+---------+---------+-----------+-----------+------------+
The confusion part is that there is already one command which can make this.
$ ETCDCTL_API=3 etcdctl endpoint status --endpoints=https://test-node-vh8tr-6888.51.test.cn:4001,https://test-node-2o9hu-4886.51.test.cn:4001,https://test-node-873t0-8911.51.test.cn:4001,https://test-node-ba93c-3871.51.test.cn:4001,https://test-node-xq2sm-5915.51.test.cn:4001 -w table
....
I propose to change the logic of endpoint status
, endpoint health
to collect all the endpoints and check the health of them. It is implemented by PR: #8116