I’m using grafana 7.5.7 using docker in Ubuntu 20.04 to track electricity spendings and comparing my current price with other providers, calculates from realtime power measurement.
I’d like to have price per kWh easily configurable because I have a number of panels that use this, currently as a hardcoded value.
I tried to use constant type variable but I do not know how to reference it on my query and I’ve not found any example like my use case.
One of the queries looks like thsi:
SELECT integral("consumo_total"::float) / 3600000.0 * 0.18339 + (4.6 * 38.84 / 365)
FROM (
SELECT mean("value") AS consumo_total FROM "CasaW" WHERE $timeFilter GROUP BY time(1m) fill(0)
)
GROUP BY time(24h,-2h)
And I would like to make 0.18339, 4.6 and 38.84 to be configurable values.
May anybody point me to the right solution. Thanks