多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 概述 granfana 的json 参数如下 <details> <summary> json 参数</summary> ``` { "receiver": "推送xxx通知", "status": "firing", "alerts": [ { "status": "firing", "labels": { "alertname": "服务报警", "grafana_folder": "服务监控", "instance": "localhost:8082", "job": "antbiz_exporter", "server": "UpWatchdogServer" }, "annotations": { "description": "服务器: localhost:8082 \n服务名: UpWatchdogServer \n服务描述: 服务已经停机超过1分钟.请尽快处理", "summary": "服务 UpWatchdogServer 停止" }, "startsAt": "2024-06-19T18:04:00+08:00", "endsAt": "0001-01-01T00:00:00Z", "generatorURL": "http://localhost:3000/alerting/grafana/adp86013lasjkb/view?orgId=1", "fingerprint": "45ae48c707cffd42", "silenceURL": "http://localhost:3000/alerting/silence/new?alertmanager=grafana&matcher=alertname%3D%E6%9C%8D%E5%8A%A1%E6%8A%A5%E8%AD%A6&matcher=grafana_folder%3D%E6%9C%8D%E5%8A%A1%E7%9B%91%E6%8E%A7&matcher=instance%3Dlocalhost%3A8082&matcher=job%3Dantbiz_exporter&matcher=server%3DUpWatchdogServer&orgId=1", "dashboardURL": "", "panelURL": "", "values": { "A": 0, "C": 1 }, "valueString": "[ var='A' labels={__name__=upantbiz_server_up_time, instance=localhost:8082, job=antbiz_exporter, server=UpWatchdogServer} value=0 ], [ var='C' labels={__name__=upantbiz_server_up_time, instance=localhost:8082, job=antbiz_exporter, server=UpWatchdogServer} value=1 ]" } ], "groupLabels": { "alertname": "服务报警", "grafana_folder": "服务监控" }, "commonLabels": { "alertname": "服务报警", "grafana_folder": "服务监控", "instance": "localhost:8082", "job": "antbiz_exporter", "server": "UpWatchdogServer" }, "commonAnnotations": { "description": "服务器: localhost:8082 \n服务名: UpWatchdogServer \n服务描述: 服务已经停机超过1分钟.请尽快处理", "summary": "服务 UpWatchdogServer 停止" }, "externalURL": "http://localhost:3000/", "version": "1", "groupKey": "{}:{alertname=\"服务报警\", grafana_folder=\"服务监控\"}", "truncatedAlerts": 0, "orgId": 1, "title": "[FIRING:1] 服务报警 服务监控 (localhost:8082 antbiz_exporter UpWatchdogServer)", "state": "alerting", "message": "**Firing**\n\nValue: A=0, C=1\nLabels:\n - alertname = 服务报警\n - grafana_folder = 服务监控\n - instance = localhost:8082\n - job = antbiz_exporter\n - server = UpWatchdogServer\nAnnotations:\n - description = 服务器: localhost:8082 \n服务名: UpWatchdogServer \n服务描述: 服务已经停机超过1分钟.请尽快处理\n - summary = 服务 UpWatchdogServer 停止\nSource: http://localhost:3000/alerting/grafana/adp86013lasjkb/view?orgId=1\nSilence: http://localhost:3000/alerting/silence/new?alertmanager=grafana&matcher=alertname%3D%E6%9C%8D%E5%8A%A1%E6%8A%A5%E8%AD%A6&matcher=grafana_folder%3D%E6%9C%8D%E5%8A%A1%E7%9B%91%E6%8E%A7&matcher=instance%3Dlocalhost%3A8082&matcher=job%3Dantbiz_exporter&matcher=server%3DUpWatchdogServer&orgId=1\n" } ``` </details>