aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2024-08-26 17:13:25 +0200
committerGravatar Joe Banks <[email protected]>2024-08-26 16:59:30 +0100
commit66762aec0b6fbee8070f6bc4ee57ad8b430624be (patch)
treeeb3363f5e21fb494f82bf6f8378407c0db55c5e9 /kubernetes
parentUpdate globs to subdirectory wildcards in PR labeller config (diff)
Improve alertmanager text e-mail format
Already deployed.
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/namespaces/monitoring/alerts/alertmanager.yaml13
1 files changed, 12 insertions, 1 deletions
diff --git a/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml b/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml
index 2d994c9..f347b2b 100644
--- a/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml
+++ b/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml
@@ -43,4 +43,15 @@ receivers:
smarthost: mail.pydis.wtf:587
auth_username: [email protected]
auth_password_file: /opt/pydis/alertmanager/webhooks/EMAIL_PASSWORD
- text: 'summary: {{ .CommonAnnotations.summary }}\ndescription: {{ .CommonAnnotations.description }}"'
+ text: |
+ {{ .CommonAnnotations.summary }}
+
+ {{ .CommonAnnotations.description }}
+
+ {{ if eq .Status "firing" }}{{ range .Alerts }}
+ {{ if .Labels.instance }}{{ .Labels.instance }}: {{ end }}{{ .Annotations.summary }}:
+ {{ .Annotations.description }}
+
+ {{ .GeneratorURL }}
+
+ {{ end }}{{ else }}Alert has resolved.{{ end }}