diff --git a/alert_examples/grafana-alert.http b/alert_examples/grafana-alert.http new file mode 100644 index 0000000..a43b1c3 --- /dev/null +++ b/alert_examples/grafana-alert.http @@ -0,0 +1,41 @@ +### Send POST request with json body +POST https://synapse.hyteck.de/_matrix/maubot/plugin/alertbot/webhook/!zOcbWjsWzdREnihgeC:hyteck.de +Content-Type: application/json + +{ + "receiver": "Alertbot", + "status": "firing", + "alerts": [ + { + "status": "firing", + "labels": { + "alertname": "HTTP response not OK", + "grafana_folder": "General Alerting" + }, + "annotations": {}, + "startsAt": "2022-08-24T18:45:00+02:00", + "endsAt": "0001-01-01T00:00:00Z", + "generatorURL": "http://0.0.0.0:3000/alerting/grafana/t7R1ZdZ4k/view", + "fingerprint": "54827aa3e6b3dbbe", + "silenceURL": "http://0.0.0.0:3000/alerting/silence/new?alertmanager=grafana&matcher=alertname%3DHTTP+response+not+OK&matcher=grafana_folder%3DGeneral+Alerting", + "dashboardURL": "", + "panelURL": "", + "valueString": "[ var='B0' metric='Value' labels={server=http://s1.example.com} value=503 ]" + } + ], + "groupLabels": {}, + "commonLabels": { + "alertname": "HTTP response not OK", + "grafana_folder": "General Alerting" + }, + "commonAnnotations": {}, + "externalURL": "http://0.0.0.0:3000/", + "version": "1", + "groupKey": "{}:{}", + "truncatedAlerts": 0, + "orgId": 1, + "title": "[FIRING:1] (HTTP response not OK General Alerting)", + "state": "alerting", + "message": "**Firing**\n\nValue: [ var='B0' metric='Value' labels={server=http://s1.example.com} value=503 ]\nLabels:\n - alertname = HTTP response not OK\n - grafana_folder = General Alerting\nAnnotations:\nSource: http://0.0.0.0:3000/alerting/grafana/t7R1ZdZ4k/view\nSilence: http://0.0.0.0:3000/alerting/silence/new?alertmanager=grafana&matcher=alertname%3DHTTP+response+not+OK&matcher=grafana_folder%3DGeneral+Alerting\n" +} + diff --git a/alert_examples/grafana-resolved.http b/alert_examples/grafana-resolved.http new file mode 100644 index 0000000..a5d40f2 --- /dev/null +++ b/alert_examples/grafana-resolved.http @@ -0,0 +1,41 @@ +### Send POST request with json body +POST https://synapse.hyteck.de/_matrix/maubot/plugin/alertbot/webhook/!zOcbWjsWzdREnihgeC:hyteck.de +Content-Type: application/json + +{ + "receiver": "Alertbot", + "status": "resolved", + "alerts": [ + { + "status": "resolved", + "labels": { + "alertname": "HTTP response not OK", + "grafana_folder": "General Alerting" + }, + "annotations": {}, + "startsAt": "2022-08-24T18:45:00+02:00", + "endsAt": "2022-08-24T19:29:00+02:00", + "generatorURL": "http://0.0.0.0:3000/alerting/grafana/t7R1ZdZ4k/view", + "fingerprint": "54827aa3e6b3dbbe", + "silenceURL": "http://0.0.0.0:3000/alerting/silence/new?alertmanager=grafana&matcher=alertname%3DHTTP+response+not+OK&matcher=grafana_folder%3DGeneral+Alerting", + "dashboardURL": "", + "panelURL": "", + "valueString": "" + } + ], + "groupLabels": {}, + "commonLabels": { + "alertname": "HTTP response not OK", + "grafana_folder": "General Alerting" + }, + "commonAnnotations": {}, + "externalURL": "http://0.0.0.0:3000/", + "version": "1", + "groupKey": "{}:{}", + "truncatedAlerts": 0, + "orgId": 1, + "title": "[RESOLVED] (HTTP response not OK General Alerting)", + "state": "ok", + "message": "**Resolved**\n\nValue: [no value]\nLabels:\n - alertname = HTTP response not OK\n - grafana_folder = General Alerting\nAnnotations:\nSource: http://0.0.0.0:3000/alerting/grafana/t7R1ZdZ4k/view\nSilence: http://0.0.0.0:3000/alerting/silence/new?alertmanager=grafana&matcher=alertname%3DHTTP+response+not+OK&matcher=grafana_folder%3DGeneral+Alerting\n" +} + diff --git a/alert_examples/prometheus-alert.http b/alert_examples/prometheus-alert.http new file mode 100644 index 0000000..dabbcb7 --- /dev/null +++ b/alert_examples/prometheus-alert.http @@ -0,0 +1,47 @@ +### Send POST request with json body +POST https://synapse.hyteck.de/_matrix/maubot/plugin/alertbot/webhook/!zOcbWjsWzdREnihgeC:hyteck.de +Content-Type: application/json + +{ + "receiver": "matrix", + "status": "firing", + "alerts": [ + { + "status": "firing", + "labels": { + "alertname": "InstanceDown", + "environment": "monitoring.example.com", + "instance": "webserver.example.com", + "job": "node_exporter", + "severity": "critical" + }, + "annotations": { + "description": "webserver.example.com of job node_exporter has been down for more than 5 minutes.", + "summary": "Instance webserver.example.com down" + }, + "startsAt": "2022-06-23T11:53:14.318Z", + "endsAt": "0001-01-01T00:00:00Z", + "generatorURL": "http://monitoring.example.com:9090/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1", + "fingerprint": "9cd7837114d58797" + } + ], + "groupLabels": { + "alertname": "InstanceDown" + }, + "commonLabels": { + "alertname": "InstanceDown", + "environment": "monitoring.example.com", + "instance": "webserver.example.com", + "job": "node_exporter", + "severity": "critical" + }, + "commonAnnotations": { + "description": "webserver.example.com of job node_exporter has been down for more than 5 minutes.", + "summary": "Instance webserver.example.com down" + }, + "externalURL": "https://alert.example", + "version": "4", + "groupKey": "{}:{alertname=\"InstanceDown\"}", + "truncatedAlerts": 0 +} +