Search code examples
grafanaprometheusworld-map

Using world map plugin in Grafana with Prometheus


I’m using Grafana with Prometheus and want to use the World Map plugin: the idea is that I have several geopoints with some values that I want to visualize with World Map.

Data example that is being returned from prometheus has the following structure: Prometheus structure

Also I edit probes.json and 100% shure that World Map plugin is using my customized probes.json file. Here is the part of it:

…
{
“key”: “taipei”,
“latitude”: 25.105497,
“longitude”: 121.597366,
“name”: “Taipei”
},
{
“key”: “tokyo”,
“latitude”: 35.652832,
“longitude”: 139.839478,
“name”: “Tokyo”
},
{
“key”: “y1918”,
“latitude”: 53.717564,
“longitude”: 91.429317,
“name”: “ABAKAN”
},
{
“key”: “szvpz”,
“latitude”: 44.993166,
“longitude”: 41.103135,
“name”: “ARMAVIR”
},
{
“key”: “ugkz7”,
“latitude”: 64.5562829,
“longitude”: 40.5962809,
“name”: “ARKHANGELSK”
},
{
“key”: “v04pt”,
“latitude”: 46.3432541,
“longitude”: 47.933211,
“name”: “ASTRAKHAN”
},
…

Here is the Grafana setup: Grafana setup

I get no error but there is no circles on the map, what am I doing wrong? What data should I provide to grafana from prometheus if it is the reason of the problem I’m having? Adding Legend format “{{geohash}}” doesn’t help either.


Solution

  • I was given an answer in grafana community forum and going to repost it here, so people could find if they need it. So it apears that World Map Plugin for Grafana with Prometheus is supporting geohash, despite the fact that it is not written in doc.

    To make it work you have to enter corect settings, the data that I provide from Prometheus is correct. First you need to format metrics as a table:

    metrics In the Worldmap pannel you should enter following data:

    enter image description here

    For ES Metric Field to work with geohash you allways should enter "Value", ES Location Name Field is where do you went the points name from, and ES geo_point Filed where do you get the data geohash value from. Data I'm getting from Prometheus you can find in a question part.