grafana / worldmap-panel

Worldmap panel plugin for Grafana 3.0 that can be overlaid with circles for data points.
MIT License
310 stars 199 forks source link

InfluxDB not working with WorldMap Panel #259

Open dstreppa opened 4 years ago

dstreppa commented 4 years ago

Hi, I've found on the web (also here in the issues) similar problems about WorldMap, Grafana and InfluxDB. I've tried to follow the advices but nothing worked for me after many struggles. It's the first time I am using WorldMap plugin and so maybe I don't manage to easily find the solution. So, I have the situation explained in the screenshots below, with the map showing nothing:

Selection_440

Selection_441

Selection_442

It seems to me that configurations are correct. I have a measurement with a field named metric stuck on 100 for two different locations and 3 tags: id, latitude and longitude. Below two example queries:

> select * from geo_data where id='n_320'
name: geo_data
time                 id    lat      lon     metric
----                 --    ---      ---     ------
2020-03-31T14:51:20Z n_320 46.06143 8.96893 100
2020-03-31T14:51:25Z n_320 46.06143 8.96893 100
2020-03-31T14:51:30Z n_320 46.06143 8.96893 100
> select * from geo_data where id='n_321'
name: geo_data
time                 id    lat      lon     metric
----                 --    ---      ---     ------
2020-03-31T14:51:20Z n_321 46.06138 8.96848 100
2020-03-31T14:51:25Z n_321 46.06138 8.96848 100
2020-03-31T14:51:30Z n_321 46.06138 8.96848 100

I am using Grafana 6.4.2 (but I also tried with the latest 6.7.1) and the last version of WorldMap (installed today).

Can you help me please? Please tell me if you need more information or something is not clear.

amotl commented 4 years ago

Dear Davide,

please try adding another alias to the query on your metric field like outlined at [1]. If it still doesn't work, I am humbly directing you to our fork [2,3]. Maybe this helps getting you up to speed more quickly as it provides valuable feedback to the user within the panel tooltip when (some) things might go south while ramping it up.

With kind regards, Andreas.

[1] https://github.com/grafana/worldmap-panel#table-data-as-the-data-source [2] https://github.com/panodata/grafana-map-panel [3] https://community.panodata.org/t/grafana-map-panel/121

dstreppa commented 4 years ago

@amotl Yeah thank you. It works with your suggestion (see below)! The strange point is that I am almost sure to have tried yesterday also this setting (the unique difference was the field, named value instead of metric, but it can be anything...). Anyway, it's also true that there could have been something wrong in other settings.

Selection_445

amotl commented 4 years ago

Dear Davide,

good to hear it works for you now.

The strange point is that I am almost sure to have tried yesterday also this setting.

That might well happen because we found the refresh behavior is not optimal. That's one of the many things we've improved within our fork [1]. You can easily install it side-by-side by typing out:

# Install most recent version side by side
grafana-cli \
  --pluginUrl https://packages.hiveeyes.org/grafana/grafana-map-panel/grafana-map-panel-0.9.0.zip \
  plugins install grafana-map-panel

# Restart Grafana to activate plugin
systemctl restart grafana-server

Cheers, Andreas.

[1] https://community.panodata.org/t/grafana-map-panel/121