Grafana version: v12.1.0
Hi,
I have the following alert with two InfluxDB queries and then two expressions, one as the alert condition and the other a reduce expression to get the count of ‘processing’.
I’ve tried using {{ .Values.processingCount }} in my alert notification but this only works if the expression is set as the alert condition.
How do I populate my notification description with the value of the processingCount expression when it’s not set as the alert condition? In my email alert I just get [no value].
Thanks!
try this..
Current processing file count: {{ $values.processingCount.Value }}
Current processing file count: {{ $values.A.Value }}%
A : Query | Ref ID
Thanks for the quick reply. Tried your suggestions in my alert notification description:
But in the alert email I get [no value]

1 Like
Set processingCount as alert condition, then use
{{ $values.processingCount.Value }}
If condition uses processingQL, then use
{{ $values.processingQL.Value }}
Ref ID must match exactly.
That’s the issue I am running into. When I set my expression processingCount as my alert condition, I can inject the value of the expression into my alert notification.
It’s when the expression is not part of the alert condition logic, that it’s not possible to inject the value.
My alert condition has it’s own query, but I am using a 2nd query to pull out the processing count to then inject into my notification message for additional information. It doesn’t seem possible to use the value from the 2nd query (or even a reduce expression on the same query), in the notification message?
Maybe I am missing something?
may be
processingCount is set as the alert condition
OR
It is used inside an expression that becomes the alert condition
Then Grafana includes it in $values.
In my case work fine
summary: “Free space low on {{ $labels.instance }}”
description: |
Host: {{ $labels.description }}
IP: {{ $labels.instance }}
Free Space: {{ printf “%.2f” $values.A.Value }}%
i am using prometheus
thanks