Prometheus Variables Not Working

I am currently modifying a dashboard to work with my Prometheus data source. I put in the dashboard variables and the query returns what I am looking for:

However, when I try the variable in my visual I get no data:


If I enter the metric statically I get data:


Any ideas?

What does it look like when you click on Query Inspector?

It might be you need to use interpolation like ${host:csv}?

Check following out

The $hostname variable works just fine. I’ve tested it in Explore and the query inspector. The inspector comes back with no data on thee $cpu variable, yet it recognizes the variable:


In the dashboard variable:

I figured it out. I needed to write me regex to include cpu-total