Displaying in table / geomap from Influx DB

Hi

All I am importing MQTT data into Influx DB. I have configured my tags and fields.

The MQTT payload is JSON as follows:

{“sq”:47307260698,“f”:14075431,“md”:“FT8”,“rp”:-19,“t”:1718034854,“sc”:“M1CVZ”,“sl”:“IO91QW”,“rc”:“R2FC”,“rl”:“KO14dp”,“sa”:223,“ra”:126,“b”:“20m”}

I am using Telegraf to parse this as JSON and then add to the data some extra fields.

This all appears to be working.

Using the following Flux query

import “influxdata/influxdb/schema”
from(bucket: “PSK”)
|> range(start: -24h, stop: 0m)
|> filter(fn: (r) => r[“_measurement”] == “M1CVZ”)
|> filter(fn: (r) => r[“Mode”] == “FT8”)
|> schema.fieldsAsCols()

I am able to get the following format:

I am trying to replicate this format in Grafana using the same query I get the following result:

In the screen shot I can see a single row from the data and a selector to select each row. This only shows the name of the measure so not very usefull.

I would like to show a table on the dashboard and a Geomap based on the Latitude and Longitude of each row.

I cannot seem to get the map to display even a single row of data.

The idea is that in the map each LAT and Long should show Symbol with the title being from the Call field in the data.

I am suck, Please be nice.

The data is public so if any one wants access let me know?

Thank you

Welcome to forum @fabltd

Please share the public data?

Hi

I will need to give access tomorrow.

I have in the mean time run the following that gives me a table:

import “influxdata/influxdb/schema”
from(bucket: “PSK”)
|> range(start: -24h, stop: 0m)
|> filter(fn: (r) => r[“Mode”] == “FT8”)
|> keep(columns: [“_time”,“Flag” “_value”, “_field”])
|> schema.fieldsAsCols()

However I am getting a selector at the bottom of the table again.

How do I make the Grafana stop trying to filter my data.

Its added a filter based on viewing the Flag colume?

please post sample data as csv or as line protocol or at least list out the column names of your data

Hi

Here you go

M1CVZ,Band=20m,Continent=EU,Country=Sweden,Flag=🇸🇪,Mode=FT8,topic=pskr/filter/v2/20m/FT8/M1CVZ/SM2GHI/IO91/KP25/223/284 RxCC="284",TxCC="223",Maidenhead="KP25ax",Call="SM2GHI",Signal=-13,Sequence="4.7309249901e+10",Frequency=14075941,Latitude=65.95833333333333,Longitude=24 1718040720000000000
M1CVZ,Band=20m,Continent=EU,Country=Norway,Flag=🇳🇴,Mode=FT8,topic=pskr/filter/v2/20m/FT8/M1CVZ/LA1PHA/IO91/JP76/223/266 RxCC="266",TxCC="223",Maidenhead="JP76bh75",Call="LA1PHA",Signal=-16,Sequence="4.7309188289e+10",Frequency=14075435,Latitude=66.3125,Longitude=14.141666666666667 1718040524000000000

I can change the tags / fields if you think that would help

1 Like
from(bucket: "PSK")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r._field == "Longitude" or r._field == "Latitude")  
  |> filter(fn: (r) => r["Mode"] == "FT8")
  |> keep(columns: ["_time", "Flag", "_value", "_field"])
  |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")

Hi

That still does not work as expected.

Instead of the table showing all values It shows a LAT and Long filter and no other data.

1 Like

So the issue is that Grafana see as tag value as a group by value.

Is it possible to have Grafana ignore the group by?

1 Like

dont include Flag

from(bucket: "PSK")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r._field == "Call" or  r._field == "Longitude" or r._field == "Latitude" or r._field == "Flag")  
  |> filter(fn: (r) => r["Mode"] == "FT8")
  |> keep(columns: ["_time", "_value", "_field"])
  |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")

image

might want to continue in this thread