etcd --常用命令
#查看集群健康
ETCDCTL_API=3 ./etcdctl --endpoints="10.20.0.129:2379,10.20.0.160:2379,10.20.0.162:2379,10.20.0.163:2379,10.20.0.164:2379,10.20.0.56:2379" endpoint health
#查看集群成员
ETCDCTL_API=3 ./etcdctl --write-out=table member list
#查看集群成员状态
ETCDCTL_API=3 ./etcdctl --write-out=table --endpoints="10.88.8.52:2379,10.88.8.53:2379" endpoint status
ETCDCTL_API=3 ./etcdctl --write-out=table endpoint status
#查看是否为 leader
# 不是
curl http://127.0.0.1:2379/v2/stats/leader
{"message":"not current leader"}
# 是
curl http://127.0.0.1:2379/v2/stats/leader
{"leader":"dee3490d65c8e214","followers":{"8a3cfcf7c58cac31":{"latency":{"current":0.001877,"average":0.0036690000000000004,"standardDeviation":0.0025096500862780754,"minimum":0.001647,"maximum":0.009673},"counts":{"fail":0,"success":9}}}}
我们只需要努力,然后剩下的交给时间。