Group function limits

Hi everyone,

I’m using influx v2.3. I’m facing an issue of group() command in flux query. It’s not working properly for grafana v8.1.0. if anyone has faced same issue could you please let me know the solution for it.

Thanks in advance

Hi,

Can you please send the flux query syntax what you are using in grafana

Hi,

You can use the below syntax

from(bucket: “bucketname”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn:(r) =>r[“_measurement”] == “measurement”)
|> last()
|> group()
|> keyValues(keyColumns: [“columnname”])

It will work.

I kind of hate when people says that given function is not working properly whitout any context.

Chances are that you are not using it right.

Also hard to help whitout context.

Examples of the data and the queries used…

I have used Grafana since 8.Something and InfluxdB since 2.0 and group() works as described in the documentation.

Hi @AVVS_Sudheer

Thanks for your response.

I have tried using your query also but it didn’t worked.

but when i try my query without group function i’m able to see the data in tabular format.

Thanks in advance

Hi,

Remove the count after group and check the start date and end date whether they have the data in that range. For me it is working fine with group function in every query.

Hi,

Tried that also whenever there is any group function I’m not able to see the data. we can see the data in tabular format without the group function.

If you are getting the data correctly then remove the group function