InfluxDB and Grafana Plugin Worldmap Panel

I try to get Coverage Data (RSSI, Latitude, Longitude) displayde on a Grafana Worldmap Panel.
Connection to the InfuxDB is running fine.

But no data points are shown on the map

This is the query and the Map Config is:

Any tip what is setup wrong

Thanks Martin

1 Like

Dear Martin,

we also had our times when learning the behavior of the Worldmap Panel wrt. InfluxDB. Please try to route your fields to the plugin using an "alias".

While depicted as "boom" in the example below, we usually just call it "metric" ;].

Good luck and with kind regards,
Andreas.

Example

image

image

References

While these are coming from a topic related to OpenTSDB (Opentsdb and worldmap panel), it might actually be related and just mean that - while a bit counterintuitive - the ALIAS is the magic button here.

Outlook

We will try to have a look if this can be improved as we are currently working on some improvements to the Worldmap Panel anyway.

Andreas, thanks for your reply. I did add an alias(boom) but with no effect The Query Inspector looks fine (as far as i can see that) but still no data on the map.

image

Martin

Dear Martin,

Sorry to hear that. Did you configure your data source metric like outlined above? As you can see below, the "geohash" and "station_id" (probably "name" on your side) symbols have been set up as tags.
image

As I can see it is in fact the “geohash” tag you are using now, you should probably also configure the field mapping like depicted here, swapping "station_id" by "name", eventually.

image

Please let’s just use "metric" as a symbol/alias for the Metric Field, right? Sorry for giving you such a bad example for demonstration purposes.

Worldmap Panel is a bit tricky, still good luck making it work for you and let me know about your progress.

With kind regards,
Andreas.

Hi Andreas, i changed the settings concerning your proposal but still no data appear on the map

image

Martin

Dear Martin,

sorry to hear it still doesn’t work for you. Please don’t give up and let’s investigate further.

Investigation

Please note that with your current configuration, both "geohash" and "name" are used as fields, while the tags object is empty:
image

However, on some of the installations we are operating, the response from the InfluxDB data source looks like that:
image

Thoughts

Maybe it helps to remove the symbols "geohash" and "name" as fields but keeping them as tags only.
image

With kind regards,
Andreas.

Hi Andreas, i already tried that with the error message no geohash found. I think something is not working with the tags at my side. To you get an selection field tag when u press the + after group by ? I dont get it and typed tag (geohash) manually

Martin

Hi Martin,

Ok, let’s investigate. Assuming it is important for the Worldmap Panel to have the respective (metadata) columns established as tags instead of fields, I would like to show you how our database layout looks like. You might be able to find out more about the reason why it does not work yet on your side.

Reference

I will show you how this looks for us.

influx -database luftdaten_info -precision rfc3339

Tags

> show tag keys from ldi_readings;

tagKey
------
geohash
sensor_id
station_id

Fields

> show field keys from ldi_readings;

fieldKey             fieldType
--------             ---------
P0                   float
P1                   float
P2                   float
durP1                float
durP2                float
humidity             float
max_micro            float
min_micro            float
pressure             float
pressure_at_sealevel float
ratioP1              float
ratioP2              float
samples              float
temperature          float

So…

All the metadata you want to query for should most probably go into InfluxDB tags, while all the (numerical) measurement values should go as regular fields. For you, this would only be RSSI_DL and maybe SNR_DL.

a) What does "show tag keys" say for you?
b) Will you be able to get the database into such a shape - now that you know where you are aiming at?

Cheers,
Andreas.

Hi Andreas,

i did change the InfluxDB to use tags for geohash and name (had to adjust the node-red flow for that but straight forward)
That looks good in Grafana right now

But, … still no data in the map

I often get a error message “cant not read property ‘x’ or undefined” from the map

Martin

1 Like

Dear Martin,

your setup and configuration looks way better than initially – congratulations.

Sorry to hear that it’s still not working for you. I can vividly remember our frustrations when approaching the Worldmap Panel the first time the other day. After investing time to learn its behavior and inner mechanics, things became clearer after each iteration.

Please also make sure to get the time domain absolutely right. I mean server time, workstation time and measurement time. Otherwise, data just won’t show up. You also might want to display your data in a regular graph panel first. However, I’m assuming this already works for you.

leaflet.js itself obviously has lots of things going on with ".x" attributes/properties. However, I have never seen errors like this on our journey but will nevertheless be curious about their origin.

Good luck fiddling with the parameters – if I only could help you better. So, please let me know of any progress you might be able to make. Otherwise, you might want to share an excerpt of your data to make your case reproduceable.

With kind regards,
Andreas.

This would work best by creating a database dump like

influxd backup -portable -database luftdaten_info /tmp/luftdaten_info.influxdb

and then archiving this using tar.

Hi Andreas
i did a dump of the database. The measurement adeunis is the old one without tags, the measurement loradb mapper is the new one with tags Is there a way to attach the .rar file here ?

Martin

Everythings runs fine but not the WorldMap Panel

Thanks.

I believe the more recent one (with tags) will be appropriate.

Probably not. You might want to use https://send.firefox.com/ as a reasonable workaround.

https://send.firefox.com/download/f84826fbb89cd242/#TSmPZWA_kDQlGONhTrrsCQ

Martin

Dear Martin,

thanks for sharing an excerpt of your data. I was able to take a quick look.

The InfluxDB database

The database looks reasonable already. Thanks.

Show how to explore the InfluxDB database "ttndata" on the command line.

Import and prepare

$ influx --version
InfluxDB shell version: v1.7.6

$ influxd restore -portable ttndata.influxdb
# We'll need a database console for the next steps.
$ influx -database ttndata -precision rfc3339

Schema

> show tag keys from loradbmapper

tagKey
------
geohash
name


> show field keys from loradbmapper
name: loradbmapper
fieldKey    fieldType
--------    ---------
RSSI_DL     float
SF          string
SNR_DL      float
application string
counter     float
lat         float
lon         float

Data

> select * from loradbmapper limit 3;
name: loradbmapper
time                         RSSI_DL SF       SNR_DL application    counter geohash   lat               lon               name
----                         ------- --       ------ -----------    ------- -------   ---               ---               ----
2019-04-30T11:28:07.4485756Z -85     SF9BW125 5      squbic_adeunis 2       u0yjj60dw 50.10908333333333 8.669166666666667 adeunis-001
2019-04-30T11:28:23.5798778Z -98     SF9BW125 8      squbic_adeunis 3       u0yjj60dn 50.109            8.669166666666667 adeunis-001
2019-04-30T11:28:40.9924494Z -112    SF9BW125 3      squbic_adeunis 4       u0yjj60c6 50.10888333333333 8.669333333333332 adeunis-001

Worldmap Panel configuration

We have been successful when using these configuration settings on Grafana 6.1.0 and grafana-worldmap-panel 0.2.0.

JSON resources

Screens

Show screenshots reflecting the Grafana Worldmap Panel configuration for ttndata/loradbmapper.

Queries

image
which is equivalent to

SELECT "RSSI_DL" AS "metric" 
FROM "loradbmapper" 
WHERE $timeFilter 
GROUP BY "geohash"

Visualization

image
image
image
image

Worldmap Panel outcome

Bottom line

So, I’m a bit clueless why it won’t work on your setup. Please make sure you are using the appropriate measurement (did you actually choose "loradbmapper" over "adeunis" on the “Queries” tab after switching gears?) and also check the selected time range again:
image

Otherwise, just get back to us. We will be happy to hear about any progress you might be able to make on this.

Cheers,
Andreas.

Dear Andreas

thanks a lot for your great help.
At the end it is running

I check the settings again. Everything fine but no data an the map. But centering the map on the last geohash did work - well lets try do create a brand new dashboard with the same settings. And that was the solution. It works now !! I tried also to delete the worldmap panel in the older dashboard and create it again in the older dashboard. That does not work. So something bad with the older dahboard (but thats OK it is just a couple of seconds creating a new one)

Thanks a lot
Martin

1 Like

Excellent. Enjoy your RSSI-mapping.

With kind regards,
Andreas.

This was happening to me. In my case it was happening because I had another plugin installed (Track Map). After I remove the other plugin the problem was solved.

1 Like

Thanks a lot !!! I had Track Map installed too …
Removing it solved my problem !