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

@ -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