问题
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
回答1:
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:
回答2:
After some experimenting, I figured out that Worldmap can match country codes in Influx Db.
- Choose the country code tag in the group by.
- Alias it with
$tag_tagname
wheretagname
is the country code tag name. - Choose
Format as Time Series
- On the Worldmap tab, choose Location Data -> Countries
来源:https://stackoverflow.com/questions/39154884/grafana-worldmap-panel-with-influxdb-doesnt-show-points