Alert Email Template Variable - Very Strange Behaviour

Hi all,

i’m using Grafana 10.3.1, and i’m trying to configure a Grafana Email Alert correctly.
Here’s what my notification template within the contact points section looks like:

{{ define "email.message" }}
{{ if .Alerts.Firing -}}
{{- range .Alerts.Firing }}
{{ .Labels.alertname }} - Available IPs: {{ .Values.D }}

{{- end }}
{{- end }}
{{ if .Alerts.Resolved -}}
Resolved Alerts:
{{- range .Alerts.Resolved }}
{{ .Labels.alertname }}: Available IPs: {{ .Values.D }}
{{- end }}
{{- end }}
{{ end }}

The Alert email works fine and i’m able to visualize the “.Values.D” variable correctly. On the other hand, in the Resolved email i always get 0 as value for the “.Values.D” variable. Can anyone help me out to sort out this strange behaviour?

Thanks,

Frank