Possible to pull the field name and alias and value into an alert email?

Hello,

How can I pull the alias and field names into an email alert and the value please. Highlighted below is what I’m tried to include really. So I can get an alert like:

“Errors on SVR1 in Errors switchport 6” or if it’s the other field “Errors on SVR1 out Errors switchport 6”

Thanks

I assume you are not using the legacy alerting, but the more current Grafana Alerting. There is a ton of updated documentation to help you get started, but to do what you want, you will need to work through it using Go.

Not using legacy alerts.

So can I just use annotations in the rules section to show values?

In order to produce a message like the above, you will have to work through the templating instructions, for example:

{{  $values.D.Labels.Source }} at the {{  $values.D.Labels.Location }} has generated {{ printf "%.2f"  $values.D.Value }} jigowatts.`

would result in something like:

Lightning at the clocktower has generated 1.21 jigowatts.

Thanks, I’ll go through that, I love the Back to the Future example btw.