global: resolve_timeout: 5m smtp_from: 'alerts@v2-docker.com' smtp_smarthost: 'smtp.gmail.com:587' smtp_auth_username: '${SMTP_USERNAME}' smtp_auth_password: '${SMTP_PASSWORD}' smtp_require_tls: true # Templates for notifications templates: - '/etc/alertmanager/templates/*.tmpl' # Route tree route: group_by: ['alertname', 'cluster', 'service'] group_wait: 10s group_interval: 10s repeat_interval: 12h receiver: 'default' routes: # Critical alerts - match: severity: critical receiver: 'critical' continue: true # License abuse alerts - match: alertname: PossibleLicenseAbuse receiver: 'security' repeat_interval: 1h # Database alerts - match: service: postgres receiver: 'database' # Infrastructure alerts - match_re: alertname: ^(HighCPUUsage|HighMemoryUsage|LowDiskSpace)$ receiver: 'infrastructure' # Receivers receivers: - name: 'default' email_configs: - to: 'admin@v2-docker.com' headers: Subject: '[{{ .Status | toUpper }}] {{ .GroupLabels.alertname }}' html: |
Status: {{ .Status }}
{{ range .Alerts }}Summary: {{ .Annotations.summary }}
Description: {{ .Annotations.description }}
Labels: