# New unified grafana alerting - custom label

**URL:** <https://community.grafana.com/t/new-unified-grafana-alerting-custom-label/117555>\
**Category:** Alerting\
**Tags:** templating\
**Created:** [March 21, 2024, 12:37pm UTC](https://community.grafana.com/t/new-unified-grafana-alerting-custom-label/117555 "2024-03-21T12:37:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yjacknewton](https://avatars.discourse-cdn.com/v4/letter/y/fbc32d/32.png) [@yjacknewton](https://community.grafana.com/u/yjacknewton)\
**Post date:** [March 21, 2024, 12:37pm UTC](https://community.grafana.com/t/new-unified-grafana-alerting-custom-label/117555/1 "2024-03-21T12:37:30Z")

</div>

Hello,

I am using new Grafana alerting.  
I am facing that when alert is fired, the legend name that i have configured on the query in not taken on alert notification like in the old Grafana alerting.

It will always take the series name

Is there a way to retrieve the original legend name like on the panel displayed or from my custom legend or how to do transformation style on alerting as “TRANSFORM DATA” does

my exemple :  
the original series name : **{instance=“localhost:9100”}**

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/9/f/9f985677e1a45375013bfeedc485c31212dcfba3.png)

What **I want to have** in notification is : **Total CPU Usage**

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/3/7/37565a2d335747509dc75a1c41ce3be96f73b944.png)

I have configured a code following this link: [Templating labels and annotations | Grafana documentation](https://grafana.com/docs/grafana/latest/alerting/fundamentals/annotation-label/variables-label-annotation/)

My code:

```auto
{{ range $v := $values -}}
{{ $v.Labels }}={{ humanize ($v.Value) }}%
{{ end }}

```

![image](https://us1.discourse-cdn.com/grafana/original/3X/1/1/11376a417d9af20068be9c1a03ee2fc7243e0cc2.png)

But in mail notification, the default legend name in **Value** is always key ID, and in **Summary** it’s not changed to the display on the panel

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/2/8/28b47717a4cc5af0de06a9db294c72d5a669cfda.png)
