Converting InfluxDB Query to Flux Query

Hi everyone,

I´m sorry about that question, also with documentation i´m not able to convert my INFLUX Query to a Flux Query in Grafana.

The reason for converting is grouping by month for values. Can U help me please? What do I have to do if i want to query following in Flux instead of Influx:

SELECT integral("mean")/3600000 FROM (SELECT mean("value") as "mean" FROM "autogen"."senec.0.ENERGY.GUI_HOUSE_POW" WHERE ("value" > 0) AND $timeFilter GROUP BY time(5s) fill(0) tz('Europe/Berlin')) WHERE $timeFilter GROUP BY time(24h) tz('Europe/Berlin')

Second Database with Flux is already created in Grafana.

Thanks and appreciated,


you dont need to create new database for flux, you can use the database and use the new flux adaptor.

Sorry, I ment a second influx Source with Flux as language. It is only one Database. Which adapter so you mean?


yes I mean the grafana infulx db adaptor for flux language. you have to update your grafana installation

Set Up is already done. My Problem is to convert my influxdb query into the Flux query as i mentioned above.


yes what is the specific problem with it

I don’t understand the principle so far. Haven’t found an example which compares influxdb query to Flux query… if anyone can give me the Flux query Code for my Influxdb query above, I think I could understand it better.

you have to watch this from 17

1 Like

Thank U, this is a great video and big help for me. Now I have a query that works so far. Problem is, if start grouping data for example every: 1mo over 1 year or several months i will get a timeout in the query. Without grouping, the query is very fast.

not sure, what kind of error message

request canceled (Client.Timeout exceeded while awaiting headers)"

can yuo give it a bit more time?

yes, I would like to but I don´t know where i can do this? This would be great to find out how long it needs.
Is there a possibilty for faster query with time grouping? actually it interrupts after 30 seconds with timeout

it is not possible

can you refactor you database so that it is faster ?

Not sure what to do? I´m using IObroker with the InfluxDB Addon.

can you upgrad ?

[quote=“domi1893, post:15, topic:41125”]
o? I´m using IObroker with the I