...
1package kube
2
3import "encoding/yaml"
4
5configMap: alertmanager: {
6 "alerts.yaml": yaml.Marshal(alerts_yaml)
7 let alerts_yaml = {
8 receivers: [{
9 name: "pager"
10 // email_configs:
11 // - to: 'team-X+alerts-critical@example.org'
12 slack_configs: [{
13 channel: "#cloudmon"
14 text: """
15 {{ range .Alerts }}{{ .Annotations.description }}
16 {{ end }}
17 """
18 send_resolved: true
19 }]
20 }]
21 // The root route on which each incoming alert enters.
22 route: {
23 receiver: "pager"
24 // The labels by which incoming alerts are grouped together. For example,
25 // multiple alerts coming in for cluster=A and alertname=LatencyHigh would
26 // be batched into a single group.
27 group_by: ["alertname", "cluster"]
28 }
29 }
30}
View as plain text