ETCD:查看集群的leader节点
背景:etcd 如何查看 节点属性,比如, leader 还是 flower环境:docker 化安装的 etcd集群测试获取 etcdurletcdurl=`docker exec etcd ps -o args |grep -v ps |grep -v COMMAND |awk '{print $7}'`2. curl获取节点信息etcd 有一个接口可以获取leader...
·
背景:
etcd 如何查看 节点属性,比如, leader 还是 flower
环境:
docker 化安装的 etcd集群
测试
- 获取 etcdurl
etcdurl=`docker exec etcd ps -o args |grep -v ps |grep -v COMMAND |awk '{print $7}'`
2. curl获取节点信息
etcd 有一个接口可以获取leader信息
/v2/stats/leader
curl ${etcdurl}/v2/stats/leader
flower节点的输出
leader节点的输出
{"leader":"bd808d0fa461a88","followers":{"630f756482048e6d":{"latency":{"current":0.000848,"average":0.022868018948820703,"standardDeviation":0.12363015298678447,"minimum":0.000451,"maximum":296.310192},"counts":{"fail":0,"success":326372509}},"e240d98762f39bc":{"latency":{"current":0.001498,"average":0.0224153753830289,"standardDeviation":0.11432724022277063,"minimum":0.000452,"maximum":131.998907},"counts":{"fail":0,"success":316820616}}}}
更多推荐
已为社区贡献7条内容
所有评论(0)