How to extract value information and add it to alert information?

grafana: v9
When I was trying to move from prometheus to grafana unified alerting, I found that the grafana alerting functionality was somewhat incomplete
I can’t extract the host information of the alert, I can only send a large whole ugly content

example

**Firing**  
Value: [ metric='up{class="testnet-gateway", instance="IP:80", job="testnet", name="gateway-t1-1", region="Falkenstein", service_provider="hetzner"}' labels={__name__=up, class=testnet-gateway, instance=IP:80, job=testnet, name=gateway-t1-1, region=Falkenstein, service_provider=hetzner} value=0 ]
Labels:
- alertname = TestAlert
- instance = Grafana
Annotations:
- summary = Notification test

I just want a short and useful piece of information

**Firing**  
Value:
 - metric='up
 - instance=bar
 - name=gateway-t1-1
 - region=Falkenstein
Labels:
- alertname = TestAlert
- instance = Grafana
Annotations:
- summary = Notification test

There are only match and reReplaceAll functions in template-functions, but there is no function that matches and returns the content
I don’t know how to implement it, it’s difficult in grafana

Hello,

Did you found a solution finally? I have the same issue and cannot find any informations on it…

Check out this thread, it has steps to parse the values you want to include in your alert:

https://localhost:3000/t/custom-alert-templates-not-working/67537/3