Hello together,
i have a problem about a very specific problem to display the average of the last hour in grafana.
-
What Grafana version and what operating system are you using?
9.5.1
data source is influxDB. -
What are you trying to achieve?
i need the difference between the same value to the same value 1 hour ago but for every minute.
For example (value at 10:00 - value at 9:00) displayed at 10:00. Next (value at 10:01 - value at 9:01) displayed at 10:01 o’clock -
How are you trying to achieve it?
-
i tried it with:
SELECT difference(last(“value”)) FROM (
SELECT last(“value”) FROM “autogen”.“mqtt_data”
WHERE (“topic”::tag = ‘VALUE/VERSORGUNG/OSMOSEANLAGE/KWP01_FQ605_X_Nachspeisung_VE-Wasser’) AND $timeFilter
GROUP BY time(1m) fill(null)
) WHERE time >= now() - 1h -
What happened?
-
got an error: InfluxDB Error: difference aggregate requires a GROUP BY interval
-
What did you expect to happen?
-
for example, at 09.00 my value is 4174,66, hat 08:00 it is 4174,12. My expected result need to be 4174,12-4174,66 = 0,54 and displayed with the timestamp at 9:00.
-
The same for 09:01 and 08:01 o’clock
-
Can you copy/paste the configuration(s) that you are having problems with?
-
If needed i can post the complete JSON of the panel.
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
-
InfluxDB Error: difference aggregate requires a GROUP BY interval
-
Did you follow any online instructions? If so, what is the URL?
-
chatgpt ;).
Thanks for your effort!