Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to group by latitude and longitude using influx 2.0 #306

Open
alduxvm opened this issue Mar 17, 2021 · 2 comments
Open

How to group by latitude and longitude using influx 2.0 #306

alduxvm opened this issue Mar 17, 2021 · 2 comments

Comments

@alduxvm
Copy link

alduxvm commented Mar 17, 2021

Hi!

My bucket contains measurements for latitude and longitude, but I cannot seem to group by and therefore no data displays on the plugin in grafana...

My query in flux is as follows:

from(bucket: "heartbeat")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "measurement")
  |> filter(fn: (r) => r["_field"] == "latitude" or r["_field"] == "longitude")
  |> filter(fn: (r) => r["location"] == "v3p-bcs-54b20389fa62")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")

If I use another plugin like trackmap I can properly see the position, but I cannot seem to create the proper query using flux for worldmap...

Thanks!

@maxdd
Copy link

maxdd commented Apr 1, 2021

I think something is definitely broken somewhere.
I've tried as well and i can't seem to get anything displayed.
Also #295

In my case i have the following table

image

from(bucket: "npm-graf")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "ReverseProxyConnections" and r["_field"] == "IP")
  |> group(columns: ["IP", "latitude", "longitude"], mode:"by")
  |> count(column: "_value")

and grafana is configured as such

image

but nothing is shown

@maxdd
Copy link

maxdd commented Jul 1, 2021

Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants