Variables Formatting in Grafana Alerts

Hi all, I’m using Grafana’s (9.0) alert manager to send notifications to slack.
for some reason, I can’t seem to be able to format any variables from the metric in the msg.

I’ve tried accessing the metric labels in several ways, none of them seems to work, like shown in the pictures below, I tried formatting labels in anyway I could find online, and switched from a classical condition.

My Queries:


Annotations:


The Slack Output:

@yovell04 if the template fails to resolve one of the template variables, it won’t resolve any of them, even valid ones. I think one of your tries probably would work on its own.

Can you share what the output of {{$value}} is? That should work for any type of condition and will return the equivalent of the Preview Alerts button with the full map object.

Good references for working this out are:

and my solution pinned to this post: