I would like a Grafana variable that contains all the Prometheus metric names with a given prefix. I would like to do this so I can control what graphs are displayed with a drop down menu. I'd like to be able to display all the metrics matching the prefix without having to create a query for each one. In the Grafana documentation under the Prometheus data source I see:
metrics(metric) Returns a list of metrics matching the specified metric regex.
-- Using Prometheus in Grafana
I tried creating a variable in Grafana using this metrics
function but it didn't work. See the screenshot for the variable settings I have:
As you can see the "Preview of values" only shows "None"