I have an instant power consumption stored in OpenTSDB
I would like to compute the daily power consumption which is the integration of all the instant power consumption. This could have been done using average if all sampling interval where identical , which is not the case...
The formula would be something like this: Daily consumption= Sum of ( (Delta T) * InstantPower ) / 24
Delta T= Time between current consumption sample and last sample InstantPower = current power consumption sample
Is it possible to do it through OpenTSDB (or Grafana)?
This is not possible using OpenTSDB. You are limited to the aggregation functions listed on the documentation.
Grafana does not add metric manipulation ability to OpenTSDB.
When working with time series, it is actually recommended to rather submit data as the integral (i.e. a monotinically increasing counter). OpenTSDB can then "differentiate" this using the rate
function.