I use Grafana 9.0.5 and try to send alert by email.
I try these items but all of them don’t work. Any advise for it?
{{ $labels.instance }}
{{ $values.A }}
{{ $values.A.Labels }}
{{ $values.A.Labels.instance }}
Try to use {{ .CommonLabels.alertname }}
or {{ .Labels.alertname }}
.
1 Like
@mariachini
Thanks for your suggestion. Is this only for Prometheus’ alert manager?
I use Grafana 9’s alert, not Prometheus’ alert manager.
And I add the 2 items in the description, but it still doesn’t show the value.
I don’t modify anything, is it correct?
{{ .CommonLabels.alertname }}
or {{ .Labels.alertname }}
.
Hi, I find the solution.
I reference grafana - How can I dynamically pass value from my alert condition/Query condition to my notification? - Stack Overflow, it says I can use {{ $values.B0.Value }}
to get value. And I use {{ $values.B0.Labels.instance }}
to get labels.
2 Likes