Skip to content

Instantly share code, notes, and snippets.

@s-chb
Last active May 31, 2020 23:16
Show Gist options
  • Save s-chb/0564b3d890fd1c0ff5fb661d114ed144 to your computer and use it in GitHub Desktop.
Save s-chb/0564b3d890fd1c0ff5fb661d114ed144 to your computer and use it in GitHub Desktop.
global:
smtp_from:
smtp_smarthost:
smtp_auth_username:
smtp_auth_password:
templates:
- '/etc/alertmanager/template/*.tmpl'
route:
group_by: ['alertname']
group_wait: 3s
group_interval: 5s
repeat_interval: 1h
receiver: mail-slack-receiver
receivers:
- name: 'mail-slack-receiver'
slack_configs:
- api_url: put your url here
channel: 'put your channel name here'
send_resolved: true
icon_url: https://avatars3.githubusercontent.com/u/3380462
text: >-
{{ range .Alerts -}}
*Alert:* {{ .Annotations.title }}{{ if .Labels.severity }} - `{{ .Labels.severity }}`{{ end }}
*Description:* {{ .Annotations.description }}
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
{{ end }}
email_configs:
- to: 'emails of the ones that need to be notified'
send_resolved: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment