Grafana alerting print value

I am using an Influxdb source in Grafana 8. So i have created alerts based on some queries and i wanted to print the value of field in the summary. I was referring official documentation - Create Grafana managed alert rule | Grafana Labs. But i am not able to print the required value.

In alerting page the i am seeing following format of value -

[var='C' labels={field1=12,field2=abc} value=5]
[var='D' labels={field1=12,field2=abc} value=15]

I wanted to print the following summary using above format -

Value for Field1 is {{ $var.C.value }} and Field2 {{ $var.D.value }}

But i am making mistake here. What is correct solution for this?

1 Like