feat(observability): Introduced alert priority for notifications

This commit is contained in:
Patrick Sy 2025-08-12 14:20:01 +02:00
parent 975bb6b982
commit fb64314fb2
Signed by: Patrick.Sy
GPG key ID: DDDC8EC51823195E
2 changed files with 5 additions and 4 deletions

View file

@ -11,7 +11,7 @@ spec:
expr: sum by(cluster_environment) (up{pod=~"forgejo-server-.*"}) < 1 expr: sum by(cluster_environment) (up{pod=~"forgejo-server-.*"}) < 1
for: 30s for: 30s
labels: labels:
severity: major severity: critical
job: "{{ $labels.job }}" job: "{{ $labels.job }}"
annotations: annotations:
value: "{{ $value }}" value: "{{ $value }}"
@ -22,7 +22,7 @@ spec:
expr: max by(cluster_environment) (kube_job_status_failed{job_name=~"forgejo-s3-backup-.*"}) != 0 expr: max by(cluster_environment) (kube_job_status_failed{job_name=~"forgejo-s3-backup-.*"}) != 0
for: 30s for: 30s
labels: labels:
severity: major severity: critical
job: "{{ $labels.job }}" job: "{{ $labels.job }}"
annotations: annotations:
value: "{{ $value }}" value: "{{ $value }}"

View file

@ -542,12 +542,13 @@ alertmanager:
# -- (object) Alertmanager configuration # -- (object) Alertmanager configuration
config: config:
route: route:
receiver: "outlook" receiver: "blackhole"
routes: routes:
- matchers: - matchers:
- alertname=~".*" - severity=~"critical|major"
receiver: outlook receiver: outlook
receivers: receivers:
- name: blackhole
- name: outlook - name: outlook
email_configs: email_configs:
- smarthost: 'mail.mms-support.de:465' - smarthost: 'mail.mms-support.de:465'