Is there a way to do something like GROUP BY in PromQL?  My use case is to 
convert Watts to Watt-Hours.  I have a gauge metric measuring instantaneous 
power consumption every minute.  I want to calculate the daily consumption 
to display in Grafana as a time series with one bar per day over a 30 day 
period.

I found a thread here describing how to do this with Influx, but I can't 
figure out how to do this in Prometheus.  I've tried a bunch of variations 
of sum_over_time and avg_over_time. 
https://community.grafana.com/t/calculate-energy-consumsion-manually/45739/2

Alternatively, my energy monitor device also records Watt-hours as a 
counter metric which resets every day.  I'm not sure if that would make 
this any easier...

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/prometheus-users/fdbd6aef-9a70-4597-b245-9aa83204a697n%40googlegroups.com.

Reply via email to