2
votes

I installed Worldmap Panel for Grafana but I cannot display points on Worldmap Panel. I looked at Grafana worldmap: table datasource and other links but didn't find answer. I tried to use countries.json : Added screenshot I don't have reputation 10 so I cannot add more than 2 links. I tried also create table : points,key=AL,name=Alabama,latitude=32.7990 longitude=-86.8073 and in Worldmap selected for Location Data : table, for Table Label Field : points but still cannot see points. Could you please give an idea for any possible solutions : countries, states, geohash, json, jsonp or table to be able to see points for Worldmap Panel? Thank you

2
in which datasoruce you created the table ?IIIIIIIIIIIIIIIIIIIIII
Saw that you posted on the Grafana group too with more screenshots: groups.io/g/grafana/message/2171 but it's still hard to see what the datasource is? One of the screenshots shows the Test(fake) datasource and that won't work with Worldmap as its data does not have country codes or geohashes.Daniel Lee
The answer from @MarkB is the only way to use WorldMap with InfluxDb right now. You have to use Geohashes. Don't have support for InfluxDb/Table Data and Country Codes yet.Daniel Lee
Thank you very much for precision about Geohashes.Andrey

2 Answers

4
votes

The first thing I recognize with your table data is, that you provide the coordinates as latitude,longitude but you need to provide them as geohash.

As you are asking for any possible solution I am providing you my solution with influxdb:

1) Insert into influxdb:

curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'worldmap_test,host=server01,geohash=gbsuv7z value=1'

2) Set datasource in grafana to your influxdb database

3) Now in the worldmap panel set the created datasouce and use the following metric:

enter image description here enter image description here

1
votes

After some experimenting, I figured out that Worldmap can match country codes in Influx Db.

  1. Choose the country code tag in the group by.
  2. Alias it with $tag_tagname where tagname is the country code tag name.
  3. Choose Format as Time Series
  4. On the Worldmap tab, choose Location Data -> Countries

enter image description here

enter image description here