Skip to content

Commit

Permalink
Configure alertmanager to send e-mails
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristgit committed Aug 25, 2024
1 parent e280762 commit e322365
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/roles/postfix/templates/virtual.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ staff administrators
cloudflare joe,cj
netcup joe,cj
linode joe,cj
devops-alerts jc

# Admin Domain Email
conferences stelercus
Expand Down
11 changes: 11 additions & 0 deletions kubernetes/namespaces/monitoring/alerts/alertmanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ route:
matchers:
- severity="page"
continue: true
- receiver: email
continue: true

receivers:
- name: devops-team
Expand All @@ -33,3 +35,12 @@ receivers:
pagerduty_configs:
- routing_key_file: "/opt/pydis/alertmanager/webhooks/PAGERDUTY_KEY"
url: https://events.pagerduty.com/v2/enqueue
- name: email
email_configs:
- to: [email protected]
send_resolved: true
from: [email protected]
smarthost: mail.pydis.wtf
auth_username: [email protected]
auth_password_file: /opt/pydis/alertmanager/webhooks/EMAIL_PASSWORD
text: 'summary: {{ .CommonAnnotations.summary }}\ndescription: {{ .CommonAnnotations.description }}"'
Binary file modified kubernetes/namespaces/monitoring/alerts/alertmanager/secrets.yaml
Binary file not shown.

0 comments on commit e322365

Please sign in to comment.