Templating: extract value

Running Grafana on prometheus, I want to create a row per target.
up{} return a list of string in the format of "up{instance=“”,job=“server”}
How should I extract only the IP value: “” ?
I’m fine with doing it in the var def or the var usage.


You can use regex and a capture group. See this answer to an Influx query.

And here is an answer for Prometheus:


Thanks, the following did the trick for me