Changing variable to multi-value breaks queries and my soul

Very green to Grafana so pretend you are trying to explain to an 80-year-old with an AOL email address.

Attempting to monitor stats for way too many UPS devices provided by Prometheus. Created a variable called $UPSIP to use in the various queries. When the multi-value or “include all” options are NOT checked my query works as I think it should…maybe.

I was hoping to use the repeat feature so trying to RTFM I see that I have to have one of those options enabled. The second I do my query breaks and even worse the panels do not repeat, although the variable results still seem to show the multiple ip addresses I expect. Here is an example of my very simple query:

upsAdvBatteryRunTimeRemaining{instance="$UPSIP"}/6000

I fully understand this is an issue with my ignorance of the product but would appreciate any direction on what I am doing wrong. The Grafana examples seem to be based mainly on Graphite and InfluxDB data sources and I am not smart enough to extrapolate how it should also work with Prometheus.

Thanks for everyone’s time!

You need to use a regex operator I your Prometheus query

Thanks torkel, replacing the variable in my query with a regex expression did return my data, but doesn’t that defeat the purpose of the variable? I am sure my ignorance of the product is causing the confusion.

Actually I was incorrect. I believe this worked because of the three nodes I was monitoring only one was returning data. Now that I have multiple nodes sending data the panel gives me the Multiple Series Error and does not work.

So simply changing the above to what I have below resolved my issue:

upsAdvBatteryRunTimeRemaining{instance=~"$UPSIP"}/6000

I knew tilde’s were created by the devil, but mainly my lack of understanding of Grafana.