Is there a way to access the url of a datasource as a variable?

The data source properties are available via the http api, but I’d like to use the base prometheus url as part of a data link.

I suspect it might be available as each Prometheus query has an “open this query in Prometheus” link, but can’t find any documentation on it.

I’d love to be able to do this too, but also not found a way to do this yet. Have you found a way to do this yet, or is there anyone else out there who has done this?

For me, using OpenShift, there is a metric which exposes the cluster’s console url, which I can put into a variable and use a query plus regex to pull out the part of the url I need. I’d still like to know if there is any way to pull this from the datasource itself though, as I have other prometheus data sources I’d like to use which don’t have their external url embedded in any of their metrics.