From a0ec829eee42f8fbc9328660035b6016387673c5 Mon Sep 17 00:00:00 2001 From: karpenok Date: Wed, 11 Nov 2026 21:06:52 +0700 Subject: [PATCH] fix(monitoring): escape go templates with raw block in alertmanager-ntfy template --- .../core-mon/monitoring/templates/alertmanager-ntfy.yml.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/core-mon/monitoring/templates/alertmanager-ntfy.yml.j2 b/ansible/roles/core-mon/monitoring/templates/alertmanager-ntfy.yml.j2 index 5ce056d..9063aa6 100644 --- a/ansible/roles/core-mon/monitoring/templates/alertmanager-ntfy.yml.j2 +++ b/ansible/roles/core-mon/monitoring/templates/alertmanager-ntfy.yml.j2 @@ -18,6 +18,7 @@ ntfy: condition: status == "firing" && labels.severity == "critical" - tag: warning condition: status == "firing" && labels.severity != "critical" +{% raw %} templates: title: | {{ if eq .Status "resolved" }}✅ [Восстановлено] {{ index .Labels "alertname" }}: {{ if index .Labels "host" }}{{ index .Labels "host" }}{{ else }}{{ index .Labels "instance" }}{{ end }}{{ else }}🚨 [СБОЙ] {{ index .Annotations "summary" }}{{ end }} @@ -31,4 +32,6 @@ ntfy: https://graf.gunihome.ru X-Actions: | view, 📊 Открыть Grafana, https://graf.gunihome.ru, clear=true +{% endraw %} async: false +