tried them in the alert message filed can not the current value.
Total rentals: {${labels.Value}}.
Total rentals: {${labels.value}}.
Total rentals: {{.Value}}.
Total rentals: {{.value}}.
Total rentals: {${Value}}.
Total rentals: {${value}}.
Total rentals: {{value}}.
Total rentals: {{ $value }}.
is there a way to get the value in the alert message?
Full template example (uses HTML tags, works file with Telegram, unsure about Slack, email, and so on)
{{ define "tgshortbody" }}{{ range . }} <b>{{ or .Annotations.message .Labels.alertname }}</b>
{{ range .Annotations.SortedPairs }}{{ if ne .Name "message" }}{{ .Name }}: {{ .Value }}
{{ end }}{{ end }}
{{ with .ValueString }}{{ reReplaceAll "[[][^]]*metric='{?([^}']*)}?'[^]]*value=([0-9]*([.][0-9]{,3})?)[^]]*](, )?" "$1: <b>$2</b>\n" . }}
{{ end }}{{ with .PanelURL }}<a href="{{ . }}">Chart</a> {{ end }}{{ with .DashboardURL }}@<a href="{{ . }}">Dashboard</a> {{ end }}{{ with .GeneratorURL }} <a href="{{ . }}">Edit</a> {{ end }}{{ with .SilenceURL }} <a href="{{ . }}">Mute</a> {{ end }}
{{ end }}{{ end }}
{{ define "tgshort" }}{{ with .Alerts.Firing }}⚠️{{ template "tgshortbody" . }}{{ end }}{{ with .Alerts.Resolved }}✅{{ template "tgshortbody" . }}{{ end }}{{ end }}