fix(monitoring): escape go templates with raw block in alertmanager-ntfy template
ansible-core-mon / deploy (push) Successful in 12s
ansible-core-mon / deploy (push) Successful in 12s
This commit is contained in:
1 parent
317b5d6207
commit
a0ec829eee
1 file changed
+3
@@ -18,6 +18,7 @@ ntfy:
|
|||||||
condition: status == "firing" && labels.severity == "critical"
|
condition: status == "firing" && labels.severity == "critical"
|
||||||
- tag: warning
|
- tag: warning
|
||||||
condition: status == "firing" && labels.severity != "critical"
|
condition: status == "firing" && labels.severity != "critical"
|
||||||
|
{% raw %}
|
||||||
templates:
|
templates:
|
||||||
title: |
|
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 }}
|
{{ 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
|
https://graf.gunihome.ru
|
||||||
X-Actions: |
|
X-Actions: |
|
||||||
view, 📊 Открыть Grafana, https://graf.gunihome.ru, clear=true
|
view, 📊 Открыть Grafana, https://graf.gunihome.ru, clear=true
|
||||||
|
{% endraw %}
|
||||||
async: false
|
async: false
|
||||||
|
|
||||||
Reference in new issue
Block a user