Cannot display Expression value in Grafana alert

I have a systemd service that writes to a .prom file. It writes node_sandbox_status 70.5 which is a temperature value.

My Alert rule is as follows. I have Query A, Reduce Expression B, and Math Expression C:



My message template is as follows:

{{ define “server-room-temp-title” }}

Server Room Temp Alert

{{ end }}

{{ define “server-room-temp-alerting-message” }}

{{ .Values.B }}

{{ end }}

{{ define “server-room-temp-resolved-message” }}

[OK] {{ .Values.B }}

{{ end }}

{{ define “server-room-temp-body” }}

{{ if gt (len .Alerts.Firing) 0 }}{{ template “server-room-temp-alerting-message” .Alerts.Firing }}{{ end }}

{{ if gt (len .Alerts.Resolved) 0 }}{{ template “server-room-temp-resolved-message” .Alerts.Resolved }}{{ end }}

{{ end }}

My Contact Point Title and Text Body:

However, my Slack alert is not showing the value.
2023-11-07_11-10

How do I properly configure my alert to show the value of the B Expression?

I guess I needed to loop over the Annotations.

{{ define “server-room-temp-title” }}
Server Room Temp
{{ end }}

{{ define “server-room-temp-alerting-message” }}
{{ range . }}
{{ if gt (len .Annotations.summary) 0 }}{{ .Annotations.summary }}{{ end }}
{{ if gt (len .DashboardURL) 0 }}Dashboard: {{ .DashboardURL }}{{ end }}
{{ end }}
{{ end }}

{{ define “server-room-temp-resolved-message” }}
{{ range . }}
{{ if gt (len .Annotations.summary) 0 }}[OK] {{ .Annotations.summary }}{{ end }}
{{ if gt (len .DashboardURL) 0 }}Dashboard: {{ .DashboardURL }}{{ end }}
{{ end }}
{{ end }}

{{ define “server-room-temp-body” }}
{{ if gt (len .Alerts.Firing) 0 }}{{ template “server-room-temp-alerting-message” .Alerts.Firing }}{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}{{ template “server-room-temp-resolved-message” .Alerts.Resolved }}{{ end }}
{{ end }}

2023-11-07_15-31