- Template name:
telegram.message
- Content:
{{- /* Telegram message to use: {{ template "telegram.message2" . }} */ -}} {{ define "__alerts_list" -}} {{ range . }} {{if ne (index .Labels "alertname") "" -}} {{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }} {{- if ne (index .Labels "severity") "" -}} <u><b>P{{ index .Labels "severity" }}</b></u> {{ end -}}
- Template name:
telegram.message
- Content:
{{ define "alert_list" }}{{ range . }}{{ .Labels.alertname }} {{ range .Annotations.SortedPairs }}<strong>{{ .Name }}</strong>: {{ .Value }} {{ end }}| {{ if gt (len .GeneratorURL) 0 }}<a href="{{ .GeneratorURL }}">source</a> | {{ end }}{{ if gt (len .SilenceURL) 0 }}<a href="{{ .SilenceURL }}">silence</a> | {{ end }}{{ if gt (len .DashboardURL) 0 }}<a href="{{ .DashboardURL }}">dashboard</a> | {{ end }}{{ if gt (len .PanelURL) 0 }}<a href="{{ .PanelURL }}">panel</a> |{{ end }} — {{ end }}{{ end }} {{ define "telegram.message" }}
{{ if gt (len .Alerts.Firing) 0 }}FIRING!!!