0%

etcd监控命令

etcd

ETCD对磁盘要求较高,官方推荐SSD起步。

ENDPOINTS=https://192.168.3.28:2379,https://192.168.3.29:2379,https://192.168.3.30:2379

# 查看集群状态
/usr/local/bin/etcdctl --cacert=/etc/ssl/etcd/ssl/ca.pem --cert=/etc/ssl/etcd/ssl/member-05.pem --key=/etc/ssl/etcd/ssl/member-05-key.pem  --endpoints=$ENDPOINT endpoint status

# 查看健康状态
/usr/local/bin/etcdctl --cacert=/etc/ssl/etcd/ssl/ca.pem --cert=/etc/ssl/etcd/ssl/member-05.pem --key=/etc/ssl/etcd/ssl/member-05-key.pem  --endpoints=$ENDPOINT endpoint health

# 查看所有监控指标
curl --cacert /etc/ssl/etcd/ssl/ca.pem --cert /etc/ssl/etcd/ssl/member-05.pem --key /etc/ssl/etcd/ssl/member-05-key.pem  https://10.201.112.28:2379/metrics 
# 查看和磁盘相关的
curl --cacert /etc/ssl/etcd/ssl/ca.pem --cert /etc/ssl/etcd/ssl/member-05.pem --key /etc/ssl/etcd/ssl/member-05-key.pem  https://10.201.112.28:2379/metrics | grep disk_backend_commit_duration_seconds