{
"receiver": "alerting-receiver",
"status": "resolved",
"alerts": [
{
"status": "resolved",
// 应该再添加区分告警的标签,用来匹配告警规则路由
// 应该添加 em 告警代码和告警级别,用来直接告警到em
"labels": {
"alertname": "NodeExporterUnavailable",
// 可以用作抑制规则条件
"instance": "0.0.0.0:port",
"job": "node",
"severity": "High",
"tags": "这里隐藏了部分数据"
},
"annotations": {
"description": "NodeExporter在ip:port检测失败.",
"summary": "ip:62003:NodeExporterUnavailable"
},
"startsAt": "2018-05-21T17:44:52.365135464+08:00",
"endsAt": "2018-05-21T17:48:37.379420736+08:00",
"generatorURL": "http://0.0.0.0:9090/graph?xxxxxxxxxxxxxxxx"
},
{
"status": "resolved",
"labels": {
"alertname": "NodeExporterUnavailable",
"instance": "ip:port",
"job": "node",
"severity": "High",
"tags": "这里隐藏了部分数据"
},
"annotations": {
"description": "NodeExporter在ip:port检测失败.",
"summary": "ip:port:NodeExporterUnavailable"
},
"startsAt": "2018-05-21T17:44:52.365135464+08:00",
"endsAt": "2018-05-21T17:48:22.379431709+08:00",
"generatorURL": "http://0.0.0.0:9090/graph?xxxxxxxxxxxx"
}
],
"groupLabels": {
"alertname": "NodeExporterUnavailable"
},
"commonLabels": {
"alertname": "NodeExporterUnavailable",
"job": "node",
"severity": "High"
},
"commonAnnotations": {},
"externalURL": "http://0.0.0.0:9093",
"version": "4",
"groupKey": "{}/{job=~\"^(?:node)$\"}:{alertname=\"NodeExporterUnavailable\"}"
}
// 说明文档:https://github.com/prometheus/docs/blob/master/content/docs/alerting/notifications.md
在告警抑制中 可以直接使用:
"labels": {
"alertname": "NodeExporterUnavailable",
"instance": "ip:port",
"job": "node",
"severity": "High",
"tags": "这里隐藏了部分数据"
}
的键。
网友评论