status(host): use custom alert for Matrix to make it work with PAT
All checks were successful
/ Ansible Lint (push) Successful in 2m15s
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:
parent
9c2fe5ea9b
commit
c3b20abab3
5 changed files with 29 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue