From b74f7758dcbc43646515430046d0c9553f6d7662 Mon Sep 17 00:00:00 2001 From: TwiN Date: Sun, 9 Oct 2022 16:30:55 -0400 Subject: [PATCH] docs(alerting): Document how to configure ntfy alerts --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 19ebfe20..67f88d81 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga - [Configuring Matrix alerts](#configuring-matrix-alerts) - [Configuring Mattermost alerts](#configuring-mattermost-alerts) - [Configuring Messagebird alerts](#configuring-messagebird-alerts) + - [Configuring Ntfy alerts](#configuring-ntfy-alerts) - [Configuring Opsgenie alerts](#configuring-opsgenie-alerts) - [Configuring PagerDuty alerts](#configuring-pagerduty-alerts) - [Configuring Slack alerts](#configuring-slack-alerts) @@ -349,6 +350,7 @@ endpoints: - "[STATUS] == 200" ``` + ### Alerting Gatus supports multiple alerting providers, such as Slack and PagerDuty, and supports different alerts for each individual endpoints with configurable descriptions and thresholds. @@ -361,8 +363,10 @@ ignored. | `alerting.discord` | Configuration for alerts of type `discord`.
See [Configuring Discord alerts](#configuring-discord-alerts). | `{}` | | `alerting.email` | Configuration for alerts of type `email`.
See [Configuring Email alerts](#configuring-email-alerts). | `{}` | | `alerting.googlechat` | Configuration for alerts of type `googlechat`.
See [Configuring Google Chat alerts](#configuring-google-chat-alerts). | `{}` | +| `alerting.matrix` | Configuration for alerts of type `matrix`.
See [Configuring Matrix alerts](#configuring-matrix-alerts). | `{}` | | `alerting.mattermost` | Configuration for alerts of type `mattermost`.
See [Configuring Mattermost alerts](#configuring-mattermost-alerts). | `{}` | | `alerting.messagebird` | Configuration for alerts of type `messagebird`.
See [Configuring Messagebird alerts](#configuring-messagebird-alerts). | `{}` | +| `alerting.ntfy` | Configuration for alerts of type `ntfy`.
See [Configuring Ntfy alerts](#configuring-ntfy-alerts). | `{}` | | `alerting.opsgenie` | Configuration for alerts of type `opsgenie`.
See [Configuring Opsgenie alerts](#configuring-opsgenie-alerts). | `{}` | | `alerting.pagerduty` | Configuration for alerts of type `pagerduty`.
See [Configuring PagerDuty alerts](#configuring-pagerduty-alerts). | `{}` | | `alerting.slack` | Configuration for alerts of type `slack`.
See [Configuring Slack alerts](#configuring-slack-alerts). | `{}` | @@ -371,6 +375,7 @@ ignored. | `alerting.twilio` | Settings for alerts of type `twilio`.
See [Configuring Twilio alerts](#configuring-twilio-alerts). | `{}` | | `alerting.custom` | Configuration for custom actions on failure or alerts.
See [Configuring Custom alerts](#configuring-custom-alerts). | `{}` | + #### Configuring Discord alerts | Parameter | Description | Default | @@ -402,6 +407,7 @@ endpoints: send-on-resolved: true ``` + #### Configuring Email alerts | Parameter | Description | Default | @@ -463,6 +469,7 @@ endpoints: **NOTE:** Some mail servers are painfully slow. + #### Configuring Google Chat alerts | Parameter | Description | Default | @@ -483,7 +490,7 @@ alerting: endpoints: - name: website url: "https://twin.sh/health" - interval: 30s + interval: 5m conditions: - "[STATUS] == 200" - "[BODY].status == UP" @@ -495,10 +502,11 @@ endpoints: send-on-resolved: true ``` + #### Configuring Matrix alerts | Parameter | Description | Default | |:-----------------------------------------|:-------------------------------------------------------------------------------------------|:-----------------------------------| -| `alerting.matrix` | Settings for alerts of type `matrix` | `{}` | +| `alerting.matrix` | Configuration for alerts of type `matrix` | `{}` | | `alerting.matrix.server-url` | Homeserver URL | `https://matrix-client.matrix.org` | | `alerting.matrix.access-token` | Bot user access token (see https://webapps.stackexchange.com/q/131056) | Required `""` | | `alerting.matrix.internal-room-id` | Internal room ID of room to send alerts to (can be found in Room Settings > Advanced) | Required `""` | @@ -513,7 +521,7 @@ alerting: endpoints: - name: website - interval: 30s + interval: 5m url: "https://twin.sh/health" conditions: - "[STATUS] == 200" @@ -526,6 +534,7 @@ endpoints: description: "healthcheck failed" ``` + #### Configuring Mattermost alerts | Parameter | Description | Default | |:----------------------------------------------|:--------------------------------------------------------------------------------------------|:--------------| @@ -547,7 +556,7 @@ alerting: endpoints: - name: website url: "https://twin.sh/health" - interval: 30s + interval: 5m conditions: - "[STATUS] == 200" - "[BODY].status == UP" @@ -563,10 +572,11 @@ Here's an example of what the notifications look like: ![Mattermost notifications](.github/assets/mattermost-alerts.png) + #### Configuring Messagebird alerts | Parameter | Description | Default | |:-------------------------------------|:-------------------------------------------------------------------------------------------|:--------------| -| `alerting.messagebird` | Settings for alerts of type `messagebird` | `{}` | +| `alerting.messagebird` | Configuration for alerts of type `messagebird` | `{}` | | `alerting.messagebird.access-key` | Messagebird access key | Required `""` | | `alerting.messagebird.originator` | The sender of the message | Required `""` | | `alerting.messagebird.recipients` | The recipients of the message | Required `""` | @@ -582,7 +592,7 @@ alerting: endpoints: - name: website - interval: 30s + interval: 5m url: "https://twin.sh/health" conditions: - "[STATUS] == 200" @@ -597,6 +607,42 @@ endpoints: ``` +#### Configuring Ntfy alerts +| Parameter | Description | Default | +|:------------------------------|:-------------------------------------------------------------------------------------------|:------------------| +| `alerting.ntfy` | Configuration for alerts of type `ntfy` | `{}` | +| `alerting.ntfy.topic` | Topic at which the alert will be sent | Required `""` | +| `alerting.ntfy.url` | The URL of the target server | `https://ntfy.sh` | +| `alerting.ntfy.priority` | The priority of the alert | `3` | +| `alerting.ntfy.default-alert` | Default alert configuration.
See [Setting a default alert](#setting-a-default-alert) | N/A | + +[ntfy](https://github.com/binwiederhier/ntfy) is an amazing project that allows you to subscribe to desktop +and mobile notifications, making it an awesome addition to Gatus. + +Example: +```yaml +alerting: + ntfy: + topic: "gatus-test-topic" + priority: 2 + default-alert: + enabled: true + failure-threshold: 3 + send-on-resolved: true + +endpoints: + - name: website + interval: 5m + url: "https://twin.sh/health" + conditions: + - "[STATUS] == 200" + - "[BODY].status == UP" + - "[RESPONSE_TIME] < 300" + alerts: + - type: ntfy +``` + + #### Configuring Opsgenie alerts | Parameter | Description | Default | |:----------------------------------|:-------------------------------------------------------------------------------------------|:---------------------|