58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: alertmanager-config
|
|
namespace: prometheus
|
|
data:
|
|
alertmanager.yml: |
|
|
global:
|
|
resolve_timeout: 5m
|
|
smtp_smarthost: 'mail.example.com:587'
|
|
smtp_from: 'alertmanager@example.com'
|
|
smtp_auth_username: 'alertmanager@example.com'
|
|
smtp_auth_password: 'DEIN_PASSWORT'
|
|
smtp_require_tls: true
|
|
|
|
route:
|
|
receiver: 'default'
|
|
group_by: ['alertname', 'severity']
|
|
group_wait: 30s
|
|
group_interval: 5m
|
|
repeat_interval: 3h
|
|
routes:
|
|
- match:
|
|
severity: critical
|
|
receiver: 'sms'
|
|
- match:
|
|
severity: warning
|
|
receiver: 'email'
|
|
- match:
|
|
severity: info
|
|
receiver: 'default'
|
|
|
|
receivers:
|
|
- name: 'default'
|
|
webhook_configs:
|
|
- url: 'https://outlook.office.com/webhook/DEIN_TEAMS_WEBHOOK'
|
|
|
|
- name: 'email'
|
|
email_configs:
|
|
- to: 'ops@example.com'
|
|
send_resolved: true
|
|
|
|
- name: 'sms'
|
|
webhook_configs:
|
|
- url: 'https://api.twilio.com/2010-04-01/Accounts/DEIN_ACCOUNT_SID/Messages.json'
|
|
http_config:
|
|
basic_auth:
|
|
username: 'DEIN_ACCOUNT_SID'
|
|
password: 'DEIN_AUTH_TOKEN'
|
|
send_resolved: true
|
|
|
|
inhibit_rules:
|
|
- source_match:
|
|
severity: critical
|
|
target_match:
|
|
severity: warning
|
|
equal: ['alertname']
|