Hello guys, I’m running Grafana v10.0.3 on Windows with Prometheus as Data Source fed by omhgraphite with some metrics from a Windows PC
I’m trying to calculate current and forecast power consumption, based on 2 metrics I have available (CPU power consumption in W and GPU power consumption in W).
I have a sample of data every 15 seconds, I read the forum and found that, in order to get Wh I should do a sum_over_time and then divide by 240.
3600s in 1h / 15s each sample = 240
This is how my query looks like:
sum_over_time(ohm_cpu_watts{instance="$instance", sensor=~".*Package"}[1h])/240 + ignoring(hardware, hw_instance, sensor) sum_over_time(ohm_gpuintel_watts{instance="$instance"}[1h])/240
am I right so far? if so, how can I go from this Wh to kWh and to display the following values:
last 24h kWh consumption
last week kWh consumption
last month kWh consumption
current month forecast kWh consumption
thanks in advance!
elcolo.-