Hi everyone, I have a problem with the geomap visualisation in grafana. My data is stored in influxdb, It is stored as seen below :
> SHOW FIELD KEYS FROM devices
name: devices
fieldKey fieldType
-------- ---------
humidity float
latitude float
longitude float
name string
power float
rssi float
snr float
temperature float
temperature_sonde float
value float
My problem is when I try to display it as geomap in Grafana : It only works if I fill lat and lon with the field “latitude”, as if “longitude” was not recognised…
With lat and lat, it works !
but With lat and lon, problem…
yet both fields are float… I use Grafana v10.4.2 (22809dea50)
I tried to modify each configuration field to see if there is a bug somewhere. I tried the “auto” mode to get coordinates, the manual mode, modify the aliases… I also did a “math(/100)” to be very sure that “lon” is recognised as a float, and it’s ok for this !
Update : Apparently, it is the problem of having 2 fields in my SELECT request.
If I remove my first field, the last one is considered. If I have 2 fields, the last one is not displayed.
I updated to v11.1, but my problem is still here. Am I missing something ?
can you share what the data looks like in dataview?
hi @yosiasz ,
Here it is, :
time humidity latitude longitude name power rssi snr temperature
---- -------- -------- --------- ---- ----- ---- --- -----------
1721374098157000000 96.1 43.61962 3.856888 tracker-01 -96 6.8 21.2
1721375303992000000 96.8 43.619404 3.857271 tracker-01 -102 8 22.1
1721376515737000000 96.7 43.61936 3.857115 tracker-01 -98 9.2 22.4
1721377742516000000 97.5 43.619164 3.857922 tracker-01 -99 12.2 23.5
1721378982526000000 95.5 43.619688 3.857087 tracker-01 -90 11.5 25.9
1721380199376000000 78.3 43.619524 3.857383 tracker-01 -91 9.2 31.4
I can use longitude OR latitude to be displayed on the geomap (if I use coordinates “lon,lon” or “lat,lat”. The problem is I want “lat,lon” ^^ ), it depends on which one is the first Field in my request
you have 2 lon columns. where is lat?
Sorry @yosiasz it was a test I did by renaming the columns in case of… Here you can see my data in dataview :
To be more clear, here is some tests I did :
- when I do a request with field(longitude) THEN field(latitude), and when I edit the coord fields with Latitude Field → Lat and Longitude Field → Lon, it doesn’t work
-
when I do a request with field(longitude) THEN field(latitude), and when I edit the coord fields with Latitude Field → Lon and Longitude Field → Lon, it works (but nobody want this)
-
when I do a request with field(longitude) THEN field(latitude), and when I edit the coord fields with Latitude Field → Lat and Longitude Field → Lat, it doesn’t work (and nobody want this)
-
when I Change my request with field(latitude) THEN field(longitude), and when I edit the coord fields with Latitude Field → Lat and Longitude Field → Lat, it works (but nobody want this)
So base on that, it looks like the data is OK, but the 2nd field in the request is not considered… Is it more clear ? Sorry for my bad english !
I finally managed to find a solution. In my opinon it was a bug of Grafana, that doesn’t take in account multiple “timeseries” fields in the request.
Here is the solution : format data as Table, not as timeseries…
1 Like