grafana / worldmap-panel

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

Worldmap - Elasticsearch and Document Count is blank #237

Open grownuphacker opened 4 years ago

grownuphacker commented 4 years ago

Hey all,

I'm getting a blank map with no visible errors.
Source: Elasticsearch Example data (connection from a Cloud provider):

{"_id":"cdad4b24-20e4-11ea-8027-005056aed827","_type":"message","_index":"mon-_194","log_timestamp":"2019-12-17 15:49:19","client_city":"Ashburn","client_timezone":"America/New_York","client_address":"52.203.205.147","client_coordinates":"39.0481,-77.4728","client_longitude":-77.4728,"client_country":"United States","client_mapweight":1,"client_latitude":39.0481}

Sorry - I'm REALLY green with Grafana - but I can't seem to figure out how to make a worldmap where the metric is simply the count of records. I've also gone as far as adding an arbitrary 1 client_mapweight to my records and using the 'total' Aggregration. Still nothing. Not sure what I'm missing.

My Map configuration.

image

Any ideas?

idrikay commented 3 years ago

I was struggling with the same issue, using Elasticsearch as datasource in Grafana. Eventually the way we made it happen is in 2 steps:

geohash value grafana query

map data option

After that I was finally able to see my data on the map.

I am not sure the object you have provided as example could work. It contains the coordinate but the JSON schema is different. It should be

{
  "lon": ${VALUE},
  "lat": ${VALUE}
}

But it seems like client_coordinates is just the values without the keys.

I hope this helps.