Getting in a bit of muddle with it to be honest :) and cannot get the amtool to validate the routes :)
global:
resolve_timeout: 5s
smtp_smarthost: 'xxxx25'
smtp_from: 'xxxxx'
smtp_require_tls: false
route:
receiver: slack_cloud_alerts
group_by: [alertname, cluster]
group_wait: 5s
group_interval: 10s
repeat_interval: 3h
routes:
- match:
severity: critical
receiver: slack_cloud_alerts
continue: true
- match:
severity: critical
receiver: opsgenie_cloud_alerts
continue: true
- match:
severity: warning
receiver: opsgenie_cloud_alerts
continue: true
- match:
severity: information
receiver: email_cloud_alerts
continue: true
receiver: deadmansswitch
- match:
alertname: DeadMansSwitch
repeat_interval: 1m
receivers:
- name: email_cloud_alerts
email_configs:
- to: xxxxxxx
require_tls: false
- name: slack_cloud_alerts
slack_configs:
send_resolved: true
channel: 'xxxxxx'
username: 'xxxxx'
color: '{{ if eq .Status "firing" }}danger{{ else }}good{{ end }}'
pretext: '{{ .CommonAnnotations.summary }}'
text: |-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Description:* {{ .Annotations.description }}
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
{{ end }}
footer: "Prometheus Alerts"
- name: slack_eol_alerts
slack_configs:
send_resolved: true
channel: '#eol-alerts'
username: 'Cobot'
title: "{{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
text: "*Details:* {{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"
footer: "Prometheus Alerts"
- name: opsgenie_cloud_alerts
opsgenie_configs:
api_key: xxxxxxxxxxxxxxxxx
teams: xxxxxxxxxxx # Put in your team here
- name: deadmansswitch
webhook_configs:
send_resolved: true
http_config:
basic_auth:
password: xxxxxxxxxxxxxxxx