Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6950951d20
|
||
|
|
6db3afa97c
|
@@ -166,28 +166,19 @@ THX to the previous work of @decentral1se @knooflok @3wc @cellarspoon @mirsal
|
||||
```
|
||||
COMPOSE_FILE="$COMPOSE_FILE:compose.matrix-alertmanager-receiver.yml"
|
||||
```
|
||||
2. Create a matrix bot account and get an access token:
|
||||
|
||||
```
|
||||
abra app run matrix.example.com app -- sh -c 'register_new_matrix_user -u <botusername> --no-admin -k "$(cat /var/run/secrets/registration)" http://localhost:8008'
|
||||
curl -XPOST --json '{"type": "m.login.password", "identifier": {"user": "botusername", "type": "m.id.user"}, "password": "passwordforuser"}' "https://matrix.example.com/_matrix/client/v3/login"
|
||||
```
|
||||
|
||||
3. Insert the matrix access token secret:
|
||||
2. Insert the matrix access token secret:
|
||||
```
|
||||
abra app secret insert monitoring.marx.klasse-methode.it matrix_token v1
|
||||
```
|
||||
|
||||
4. Set required configurations:
|
||||
3. Set required configurations:
|
||||
```
|
||||
GF_MATRIX_USER_ID=<botusername>
|
||||
GF_MATRIX_ROOM_ID=<room-id>
|
||||
GF_MATRIX_HOME_SERVER_URL=matrix.example.com
|
||||
GF_MATRIX_USER_ID=
|
||||
GF_MATRIX_ROOM_ID=
|
||||
GF_MATRIX_HOME_SERVER_URL=
|
||||
```
|
||||
5. Configure Alertmanager webhook:
|
||||
- Create contact point under Grafana → Alerting → Contact Points → New Contact Point
|
||||
- Set Integration to "Webhook"
|
||||
- Set the url to `http://matrix-alertmanager-receiver:12345/alerts/<room-id>`
|
||||
4. Configure Alertmanager webhook and set the url to `http://matrix-alertmanager-receiver:12345/alerts/<room-id>`
|
||||
|
||||
### Alerts
|
||||
|
||||
|
||||
@@ -7,12 +7,11 @@ export GF_BACKUP_DASH_VERSION=v1
|
||||
export GF_CUSTOM_INI_VERSION=v4
|
||||
export LOKI_YML_VERSION=v4
|
||||
export PROMETHEUS_YML_VERSION=v2
|
||||
export MATRIX_ALERTMANAGER_CONFIG_VERSION=v2
|
||||
export MATRIX_ALERTMANAGER_CONFIG_VERSION=v1
|
||||
export MATRIX_ALERTMANAGER_ENTRYPOINT_VERSION=v1
|
||||
export GF_ALERTS_NODE_VERSION=v5
|
||||
export GF_ALERTS_LOKI_VERSION=v5
|
||||
export CONFIG_ALLOY_VERSION=v3
|
||||
export GF_ALERTS_TRAEFIK_VERSION=v1
|
||||
|
||||
# migrates secrets from old names to new names by reading values from the
|
||||
# running containers on the server and re-inserting them under the new names.
|
||||
|
||||
@@ -54,35 +54,21 @@ templating:
|
||||
{{ else if .Alert.Labels.alertname }}
|
||||
{{ .Alert.Labels.alertname }}
|
||||
{{ end }}
|
||||
{{ if .Alert.Labels.rulename }}
|
||||
→ <strong>{{ .Alert.Labels.rulename }}</strong>
|
||||
{{ end }}
|
||||
{{ if .Alert.Labels.grafana_folder }}
|
||||
<em>({{ .Alert.Labels.grafana_folder }})</em>
|
||||
{{ end }}
|
||||
>>
|
||||
{{ if .Alert.Labels.severity }}
|
||||
{{ .Alert.Labels.severity | ToUpper }}:
|
||||
{{ .Alert.Labels.severity | ToUpper }}:
|
||||
{{ end }}
|
||||
{{ if .Alert.Annotations.description }}
|
||||
{{ .Alert.Annotations.description }}
|
||||
{{ else if .Alert.Annotations.summary }}
|
||||
{{ .Alert.Annotations.summary }}
|
||||
{{ else if .Alert.Labels.rulename }}
|
||||
Query {{ .Alert.Labels.ref_id }} returned no data (datasource {{ .Alert.Labels.datasource_uid }})
|
||||
{{ end }}
|
||||
{{ if .Alert.Labels.instance }}
|
||||
on {{ .Alert.Labels.instance }}
|
||||
{{ end }}
|
||||
>>
|
||||
{{ if .Alert.Annotations.runbook }}
|
||||
<a href="{{ .Alert.Annotations.runbook }}">Runbook</a> |
|
||||
<a href="{{ .Alert.Annotations.runbook }}">Runbook</a> |
|
||||
{{ end }}
|
||||
{{ if .Alert.Annotations.dashboard }}
|
||||
<a href="{{ .Alert.Annotations.dashboard }}">Dashboard</a> |
|
||||
{{ end }}
|
||||
{{ if .GeneratorURL }}
|
||||
<a href="{{ .GeneratorURL }}">Rule</a> |
|
||||
<a href="{{ .Alert.Annotations.dashboard }}">Dashboard</a> |
|
||||
{{ end }}
|
||||
<a href="{{ .SilenceURL }}">Silence</a>
|
||||
</p>`}}'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
docker-events:
|
||||
image: docker:29.9.3-cli
|
||||
image: docker:29.8.1-cli
|
||||
command: >
|
||||
docker events
|
||||
--format '{{json .}}'
|
||||
|
||||
@@ -5,9 +5,9 @@ services:
|
||||
image: "prometheuscommunity/smartctl-exporter:v0.15.0"
|
||||
volumes:
|
||||
- "/var/lib/smartmontools/json:/debug"
|
||||
- "/dev:/dev:ro"
|
||||
command:
|
||||
- "--smartctl.fake-data"
|
||||
- "--smartctl.interval=1h"
|
||||
networks:
|
||||
- "proxy"
|
||||
deploy:
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ services:
|
||||
condition: any
|
||||
labels:
|
||||
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.3.1+v1.21.3"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.3.0+v1.21.3"
|
||||
configs:
|
||||
config_alloy:
|
||||
template_driver: golang
|
||||
|
||||
Reference in New Issue
Block a user