diff options
author | 2024-05-27 16:05:14 +0100 | |
---|---|---|
committer | 2024-05-27 17:52:37 +0100 | |
commit | 89ef325eaf5f35f32b1ade89550ecb184af48246 (patch) | |
tree | d6d596608a7757d1c03ebc4b09003590bdbb1fd9 | |
parent | Add 404 fallback for files server (diff) |
Fix AlertManager Discord instance formatting
We made a change to include the instance in alerts sent to Discord, but
not all of our configured alerts send this field.
As a result, we would have incorrectly formatted alerts being sent
through to Discord which were tricky to read.
The format template has now been changed to only conditionally render
the instance label if it is present on a triggered alert.
-rw-r--r-- | kubernetes/namespaces/monitoring/alerts/alertmanager.yaml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml b/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml index 0c53ee3..558f208 100644 --- a/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml +++ b/kubernetes/namespaces/monitoring/alerts/alertmanager.yaml @@ -22,7 +22,7 @@ receivers: title: '{{ if eq .Status "firing" }}[FIRING]{{ else }}[RESOLVED]{{ end }}' text: | {{ if eq .Status "firing" }}{{ range .Alerts }} - `{{ .Labels.instance }}`: **{{ .Annotations.summary }}:** + {{ if .Labels.instance }}`{{ .Labels.instance }}`: {{ end }}**{{ .Annotations.summary }}:** {{ .Annotations.description }} [(Link)]({{.GeneratorURL}}) {{ end }}{{ else }}Alert has resolved.{{ end }} |