美文网首页监控告警
2018-05-24 prometheus alertmanag

2018-05-24 prometheus alertmanag

作者: 多吃水果少吃肉 | 来源:发表于2018-05-24 15:41 被阅读157次
    {
        "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": "这里隐藏了部分数据"
                }
    

    的键。

    相关文章

      网友评论

        本文标题:2018-05-24 prometheus alertmanag

        本文链接:https://www.haomeiwen.com/subject/hyesjftx.html