How to parse a Prometheus string using Regex?

I have Grafana fetching this data from MySQL

hits {metric="58850", title="Foo bar", url=""}

In the Grafana charts, I’m interested in only showing the title, without quotes Foo bar. As far as I can tell, this can be done using grafana filter by name via Regex. But I don’t know what Regex to use.

I tried to use the example on Grafana official website, but that it’s not working

enter image description here

As you can see, it’s not working.


I would use Label configuration in the query tab (so no transformation). Set {{title}} there and only title label will be used as a metric label (name) in the Grafana.

Would I be able to get the url and my metric?

The metric and url in this example are used to create data links so i need them.

You can use multiple labels there and you can customize for your needs, e.g.{{url}} {{title}}, {{url}}-{{title}},url={{url}} title={{title}}, …

thank you so much, im currently on vacation, will try that in few days when i get back to work. Thanks :slight_smile: