From 81aae3d1bbcd809a8af4659bf3f6cc5baee10dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 6 Jul 2026 12:37:26 +0200 Subject: [PATCH] Add icons to visualize alert severity --- .../kosmos_prometheus/templates/default/alertmanager.yml.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos_prometheus/templates/default/alertmanager.yml.erb b/site-cookbooks/kosmos_prometheus/templates/default/alertmanager.yml.erb index bced457..202d98a 100644 --- a/site-cookbooks/kosmos_prometheus/templates/default/alertmanager.yml.erb +++ b/site-cookbooks/kosmos_prometheus/templates/default/alertmanager.yml.erb @@ -26,6 +26,6 @@ receivers: send_resolved: <%= wc["send_resolved"] %> payload: room: "<%= wc["room"] %>" - message: '{{ .Status | toUpper }}: {{ .CommonLabels.alertname }}{{ if .CommonLabels.instance }} on {{ .CommonLabels.instance }}{{ end }}{{ if .CommonLabels.vm_host }} (host: {{ .CommonLabels.vm_host }}){{ end }} — {{ .CommonAnnotations.summary }}' + message: '{{ if eq .Status "resolved" }}✅{{ else if eq .CommonLabels.severity "warning" }}⚠️{{ else }}🚨{{ end }} {{ .Status | toUpper }}: {{ .CommonLabels.alertname }}{{ if .CommonLabels.instance }} on {{ .CommonLabels.instance }}{{ end }}{{ if .CommonLabels.vm_host }} (host: {{ .CommonLabels.vm_host }}){{ end }} — {{ .CommonAnnotations.summary }}' <% end %> <% end %>