From 149ac1624da6ad53810f616057e3e528ba51d791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Sat, 10 Sep 2022 01:00:36 +0200 Subject: [PATCH] Add uptime-kuma examples --- CHANGELOG.md | 3 + alert_examples/uptime-kuma-503-alert.http | 72 +++++++++++++++++++ alert_examples/uptime-kuma-503-alert.json | 68 ++++++++++++++++++ alert_examples/uptime-kuma-503-resolved.http | 73 ++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 alert_examples/uptime-kuma-503-alert.http create mode 100644 alert_examples/uptime-kuma-503-alert.json create mode 100644 alert_examples/uptime-kuma-503-resolved.http diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e2a604c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# September 2022 + +* Add [uptime-kuma](https://github.com/louislam/uptime-kuma) example \ No newline at end of file diff --git a/alert_examples/uptime-kuma-503-alert.http b/alert_examples/uptime-kuma-503-alert.http new file mode 100644 index 0000000..2917848 --- /dev/null +++ b/alert_examples/uptime-kuma-503-alert.http @@ -0,0 +1,72 @@ +### Send POST request with json body +POST https://synapse.hyteck.de/_matrix/maubot/plugin/alertbot/webhook/!zOcbWjsWzdREnihgeC:hyteck.de +Content-Type: application/json + +{ + "heartbeat": { + "monitorID": 5, + "status": 0, + "time": "2022-09-09 20:46:32.855", + "msg": "Request failed with status code 503", + "important": true, + "duration": 60 + }, + "monitor": { + "id": 5, + "name": "S1", + "url": "http://s1.hyteck.de", + "method": "GET", + "hostname": null, + "port": null, + "maxretries": 0, + "weight": 2000, + "active": 1, + "type": "http", + "interval": 60, + "retryInterval": 60, + "resendInterval": 0, + "keyword": null, + "expiryNotification": false, + "ignoreTls": false, + "upsideDown": false, + "maxredirects": 10, + "accepted_statuscodes": [ + "200-299" + ], + "dns_resolve_type": "A", + "dns_resolve_server": "1.1.1.1", + "dns_last_result": null, + "pushToken": null, + "docker_container": "", + "docker_host": null, + "proxyId": null, + "notificationIDList": { + "1": true + }, + "tags": [ + { + "id": 4, + "monitor_id": 5, + "tag_id": 2, + "value": "", + "name": "Hyteck", + "color": "#2563EB" + } + ], + "mqttUsername": "", + "mqttPassword": "", + "mqttTopic": "", + "mqttSuccessMessage": "", + "databaseConnectionString": null, + "databaseQuery": null, + "authMethod": null, + "authWorkstation": null, + "authDomain": null, + "radiusUsername": null, + "radiusPassword": null, + "radiusCalledStationId": null, + "radiusCallingStationId": null, + "radiusSecret": null + }, + "msg": "[S1] [🔴 Down] Request failed with status code 503" +} diff --git a/alert_examples/uptime-kuma-503-alert.json b/alert_examples/uptime-kuma-503-alert.json new file mode 100644 index 0000000..ef0ea5a --- /dev/null +++ b/alert_examples/uptime-kuma-503-alert.json @@ -0,0 +1,68 @@ +{ + "heartbeat": { + "monitorID": 5, + "status": 0, + "time": "2022-09-09 20:46:32.855", + "msg": "Request failed with status code 503", + "important": true, + "duration": 60 + }, + "monitor": { + "id": 5, + "name": "S1", + "url": "http://s1.hyteck.de", + "method": "GET", + "hostname": null, + "port": null, + "maxretries": 0, + "weight": 2000, + "active": 1, + "type": "http", + "interval": 60, + "retryInterval": 60, + "resendInterval": 0, + "keyword": null, + "expiryNotification": false, + "ignoreTls": false, + "upsideDown": false, + "maxredirects": 10, + "accepted_statuscodes": [ + "200-299" + ], + "dns_resolve_type": "A", + "dns_resolve_server": "1.1.1.1", + "dns_last_result": null, + "pushToken": null, + "docker_container": "", + "docker_host": null, + "proxyId": null, + "notificationIDList": { + "1": true + }, + "tags": [ + { + "id": 4, + "monitor_id": 5, + "tag_id": 2, + "value": "", + "name": "Hyteck", + "color": "#2563EB" + } + ], + "mqttUsername": "", + "mqttPassword": "", + "mqttTopic": "", + "mqttSuccessMessage": "", + "databaseConnectionString": null, + "databaseQuery": null, + "authMethod": null, + "authWorkstation": null, + "authDomain": null, + "radiusUsername": null, + "radiusPassword": null, + "radiusCalledStationId": null, + "radiusCallingStationId": null, + "radiusSecret": null + }, + "msg": "[S1] [🔴 Down] Request failed with status code 503" +} diff --git a/alert_examples/uptime-kuma-503-resolved.http b/alert_examples/uptime-kuma-503-resolved.http new file mode 100644 index 0000000..78ba0c7 --- /dev/null +++ b/alert_examples/uptime-kuma-503-resolved.http @@ -0,0 +1,73 @@ +### Send POST request with json body +POST https://synapse.hyteck.de/_matrix/maubot/plugin/alertbot/webhook/!zOcbWjsWzdREnihgeC:hyteck.de +Content-Type: application/json + +{ + "heartbeat": { + "monitorID": 5, + "status": 1, + "time": "2022-09-09 20:59:33.156", + "msg": "200 - OK", + "ping": 4, + "important": true, + "duration": 60 + }, + "monitor": { + "id": 5, + "name": "S1", + "url": "http://s1.hyteck.de", + "method": "GET", + "hostname": null, + "port": null, + "maxretries": 0, + "weight": 2000, + "active": 1, + "type": "http", + "interval": 60, + "retryInterval": 60, + "resendInterval": 0, + "keyword": null, + "expiryNotification": false, + "ignoreTls": false, + "upsideDown": false, + "maxredirects": 10, + "accepted_statuscodes": [ + "200-299" + ], + "dns_resolve_type": "A", + "dns_resolve_server": "1.1.1.1", + "dns_last_result": null, + "pushToken": null, + "docker_container": "", + "docker_host": null, + "proxyId": null, + "notificationIDList": { + "1": true + }, + "tags": [ + { + "id": 4, + "monitor_id": 5, + "tag_id": 2, + "value": "", + "name": "Hyteck", + "color": "#2563EB" + } + ], + "mqttUsername": "", + "mqttPassword": "", + "mqttTopic": "", + "mqttSuccessMessage": "", + "databaseConnectionString": null, + "databaseQuery": null, + "authMethod": null, + "authWorkstation": null, + "authDomain": null, + "radiusUsername": null, + "radiusPassword": null, + "radiusCalledStationId": null, + "radiusCallingStationId": null, + "radiusSecret": null + }, + "msg": "[S1] [✅ Up] 200 - OK" +}