This commit is contained in:
nyyu 2022-04-22 20:16:39 +02:00
commit 1ac93ba11b
16 changed files with 17834 additions and 0 deletions

View file

@ -0,0 +1,11 @@
{{ define "telegram.custom.message" }}
{{ range .Alerts }}
{{ if eq .Status "firing"}}🔥<b>{{ .Labels.alertname }}</b>🔥{{ else }}👌<b>{{ .Labels.alertname }}</b>👌{{ end }}
<b>Labels:</b>{{ range $key, $value := .Labels }}{{ if ne $key "alertname" }}
- {{ $key }}: {{ $value }}{{ end }}{{ end }}
<b>Annotations:</b>{{ range $key, $value := .Annotations }}
- {{ $key }}: {{ reReplaceAll "(?s)LABELS = (.*)" "" $value }}{{ end }}
<b>Start:</b> {{ .StartsAt }}{{ if eq .Status "resolved"}}
<b>Ended:</b> {{ .EndsAt }}{{ end }}
{{ end }}
{{ end }}