infrastructure/ansible/plays/services/mimir/alertmanager.yml

51 lines
1.6 KiB
YAML

global:
resolve_timeout: 5m
route:
group_by: ['alertname']
group_wait: 5s
group_interval: 5m
repeat_interval: 1h
receiver: 'matrix-monitoring'
routes:
- receiver: 'hcio'
repeat_interval: 1h
matchers:
- alertname="PrometheusAlertmanagerE2eDeadManSwitch"
- receiver: 'email'
group_interval: 1m
matchers:
- job="matrix_synapse_1"
- receiver: 'matrix-monitoring'
group_wait: 30s
group_interval: 1h
matchers:
- alertname="PrometheusAllTargetsMissing"
- receiver: 'matrix-monitoring'
group_wait: 30s
group_interval: 1h
matchers:
- alertname="PrometheusTargetMissing"
receivers:
- name: 'email'
email_configs:
- to: '{{ mimir.alertmanager.smtp.target }}'
from: '"Alertmanager" <{{ mimir.alertmanager.smtp.username }}>'
smarthost: 'mxe8cf.netcup.net:587'
auth_username: '{{ mimir.alertmanager.smtp.username }}'
auth_identity: '{{ mimir.alertmanager.smtp.username }}'
auth_password: '{{ mimir.alertmanager.smtp.password }}'
- name: 'hcio'
email_configs:
- to: '{{ mimir.alertmanager.hcio.mail }}'
from: '"Alertmanager" <{{ mimir.alertmanager.smtp.username }}>'
smarthost: 'mxe8cf.netcup.net:587'
auth_username: '{{ mimir.alertmanager.smtp.username }}'
auth_identity: '{{ mimir.alertmanager.smtp.username }}'
auth_password: '{{ mimir.alertmanager.smtp.password }}'
- name: 'matrix-monitoring'
webhook_configs:
- url: 'http://alertmanager-matrix:3000/alerts?secret={{ mimir.alertmanager.matrix.alertmanager_token }}'