告警
显示
pxctl service alerts show /opt/pwx-etcd/bin/runc exec -e ETCDCTL_API=3 \
portworx-etcd etcdctl get --prefix "pwx/<Cluster ID>/alerts"curl -sL http://127.0.0.1:2379/v2/keys/pwx/<Cluster ID>/alert/?recursive=true \
| python -m json.tool | grep \"value\" | sed 's#\\"#"#g'curl -sX GET "http://<PX Node IP>:9001/v1/cluster/alerts/0" \
-H "accept: application/json" | python -m json.tool示例
Etcd 和 REST API
{
"alert_type": 36,
"id": 37,
"message": "Node c2045f14-4f21-4265-8c0a-89de427c611d (10.133.100.57) marked down by 3aff8b4f-39f6-4326-a3c6-3883a8a27931 (10.133.100.55): node did not respond to gossip heartbeats",
"resource": 3,
"resource_id": "c2045f14-4f21-4265-8c0a-89de427c611d",
"severity": 2,
"timestamp": {
"nanos": 647290688,
"seconds": 1548659451
},
"ttl": 86400
}{
"alert_type": 11,
"id": 38,
"message": "Node 10.133.100.57 has an Operational Status: Down",
"resource": 3,
"resource_id": "c2045f14-4f21-4265-8c0a-89de427c611d",
"severity": 1,
"timestamp": {
"nanos": 659181061,
"seconds": 1548659451
},
"ttl": 172800
}Pxctl
对象
等级
编码
Last updated