status(host): use custom alert for Matrix to make it work with PAT
All checks were successful
/ Ansible Lint (push) Successful in 2m15s

The Personal Access Token we use isn't compatible with the default
Matrix alerting provider, so use a custom alert.
This commit is contained in:
June 2026-02-01 20:49:33 +01:00
commit c3b20abab3
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
5 changed files with 29 additions and 11 deletions

View file

@ -5,7 +5,8 @@ easterhegg-websites-defaults: &easterhegg_websites_defaults
group: Websites
interval: 5m
alerts:
- type: matrix
# - type: matrix
- type: custom
failure-threshold: 3
success-threshold: 1
minimum-reminder-interval: "12h"
@ -15,7 +16,8 @@ easterhegg-websites-redirects-defaults: &easterhegg_websites_redirects_defaults
group: Websites (Redirects)
interval: 15m
alerts:
- type: matrix
# - type: matrix
- type: custom
failure-threshold: 3
success-threshold: 1
minimum-reminder-interval: "24h"

View file

@ -18,10 +18,21 @@ ui:
default-sort-by: group
alerting:
matrix:
server-url: "https://matrix.nekover.se"
access-token: "${MATRIX_ACCESS_TOKEN}"
internal-room-id: "!jG755onbGAH-lZsZo8SRKtlsncSMvq7nzPhwCi5CgdQ"
# matrix:
# server-url: "https://matrix.nekover.se"
# access-token: "${MATRIX_ACCESS_TOKEN}"
# internal-room-id: "!jG755onbGAH-lZsZo8SRKtlsncSMvq7nzPhwCi5CgdQ"
custom:
url: "https://matrix.nekover.se/_matrix/client/v3/rooms/%21jG755onbGAH-lZsZo8SRKtlsncSMvq7nzPhwCi5CgdQ/send/m.room.message"
method: "POST"
body: |
{
"msgtype": "m.text",
"body": "[ALERT_TRIGGERED_OR_RESOLVED]: [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION] - [RESULT_ERRORS]"
}
headers:
Authorization: "Bearer ${MATRIX_ACCESS_TOKEN}"
# A bit more than the default 5 concurrent checks should be fine.
concurrency: 15

View file

@ -3,7 +3,8 @@ services-chaosknoten-defaults: &services_chaosknoten_defaults
group: Services (Chaosknoten)
interval: 1m
alerts:
- type: matrix
# - type: matrix
- type: custom
failure-threshold: 5
success-threshold: 2
minimum-reminder-interval: "6h"

View file

@ -3,7 +3,8 @@ sites-defaults: &sites_defaults
group: Sites
interval: 1m
alerts:
- type: matrix
# - type: matrix
- type: custom
failure-threshold: 5
success-threshold: 2
minimum-reminder-interval: "6h"

View file

@ -5,7 +5,8 @@ websites-defaults: &websites_defaults
group: Websites
interval: 1m
alerts:
- type: matrix
# - type: matrix
- type: custom
failure-threshold: 5
success-threshold: 2
minimum-reminder-interval: "6h"
@ -15,7 +16,8 @@ websites-staging-defaults: &websites_staging_defaults
group: Websites (Staging)
interval: 5m
alerts:
- type: matrix
# - type: matrix
- type: custom
failure-threshold: 3
success-threshold: 1
minimum-reminder-interval: "24h"
@ -25,7 +27,8 @@ websites-redirects-defaults: &websites_redirects_defaults
group: Websites (Redirects)
interval: 5m
alerts:
- type: matrix
# - type: matrix
- type: custom
failure-threshold: 3
success-threshold: 1
minimum-reminder-interval: "24h"