Grafana worldmap panel with Influxdb doesn't show points

 ̄綄美尐妖づ 提交于 2021-02-08 02:04:44

问题


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.

  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



来源:https://stackoverflow.com/questions/39154884/grafana-worldmap-panel-with-influxdb-doesnt-show-points

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!