I am using the below PromQL to get the percentage of devices that are UP
within sites mapped to geolocation and mapping it with the Geomap panel in
Grafana:

‘(count by (geohash,location) (up==1) / count by (geohash,location) (up)) *
100’

Is there a way to also get the value of each of the ‘count by’ instances
into the final output? So I would end up with something like:

’{geohash=“xxxxx”,location=“xxxxx”,total_devices=“x”,up_devices=“x”} 99%’

The reason for is this so that the values show up as a reference on the
Geomap tooltip when you hover over a location, no calculations will be done
with the numbers, hence wanting them as label values.

Is this possible? And if so, please could someone assist with the necessary
PromQL?


Thanks

Nick

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAC4WY5-xCVM42wYHfeG7%3DuSkbizFZv0B60nE%2BTbtJzOvZznQtA%40mail.gmail.com.

Reply via email to