I currently have a default title set up for Slack notifications.
{{ define "slack.default.title" }}
{{ .CommonLabels.node_name }} Load Alert
{{ end }}
And a condition where if it’s Firing, show a certain message, and if it’s Resolved, show another.
{{ define "slack" }}
{{ if gt (len .Alerts.Firing) 0 }}{{ template "slack.default.message" .Alerts.Firing }}{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}{{ template "slack.resolved.message" .Alerts.Resolved }}{{ end }}
{{ end }}
Is there a way to change the title if it’s resolved? I would like it to just be:
{{ .CommonLabels.node_name }} [OK]
I cannot find anything in the docs on how to achieve this, if possible.