Files
2026-05-21 14:04:31 +02:00

16 lines
1.6 KiB
JSON

{
"kind": "TemplateGroup",
"apiVersion": "notifications.alerting.grafana.app/v1beta1",
"metadata": {
"name": null,
"namespace": "default",
"uid": null,
"resourceVersion": "eda0ea0b22e1308b"
},
"spec": {
"title": "slack.lively",
"content": "{{ define \"slack.lively\" }}\n\n{{- if eq (len .Alerts) 1 -}}\n {{- $a := index .Alerts 0 -}}\n\n {{- if eq $a.Status \"firing\" -}}\n🚨 *{{ $a.Labels.alertname }}* is *FIRING*\n {{- else -}}\n✅ *{{ $a.Labels.alertname }}* is *RESOLVED*\n {{- end }}\n\n {{- if $a.Annotations.summary }}\n🧾 {{ $a.Annotations.summary }}\n {{- end }}\n\n📍 *Context*\n{{- range $k, $v := $a.Labels }}\n• *{{ $k }}:* `{{ $v }}`\n{{- end }}\n\n🕒 *Started:* `{{ $a.StartsAt }}`\n<{{ $a.GeneratorURL }}|🔍 View Alert>\n\n {{- if $a.Annotations.description }}\n> {{ $a.Annotations.description }}\n {{- end }}\n\n{{- else -}}\n\n🚨 *{{ len .Alerts }} alerts active*\n\n{{ range .Alerts }}\n━━━━━━━━━━━━━━\n{{- if eq .Status \"firing\" -}}\n🔥 *{{ .Labels.alertname }}*\n{{- else -}}\n✅ *{{ .Labels.alertname }} resolved*\n{{- end }}\n\n{{- if .Annotations.summary }}\n🧾 {{ .Annotations.summary }}\n{{- end }}\n\n{{- if .Labels.instance }}\n💻 `{{ .Labels.instance }}`\n{{- end }}\n{{- if .Labels.node }}\n🧠 `{{ .Labels.node }}`\n{{- end }}\n\n🔎 {{ range $k, $v := .Labels }}\n`{{ $k }}={{ $v }}`\n{{- end }}\n\n<{{ .GeneratorURL }}|Open>\n\n{{- if .Annotations.description }}\n> {{ .Annotations.description }}\n{{- end }}\n\n{{ end }}\n\n{{- end }}\n\n{{ end }}",
"kind": "grafana"
}
}