Worldmap panel with Prometheus metrics

Hello, Is possible use prometheus metric to visualise stats on Worldmap Panel? I know how to make it with country code in label of metric, but could I use a geohash in a label of metric?

For example:
exporter_test{country="FR",geo="u09tvrw3xgrb",instance="localhost:2000",job="prometheus"}

Or is better use a different datasource as InfluxDB or anything else? I would like to visualise metrics not for country, but for more precise location. Thank you for your help! :slightly_smiling_face:

Hi,

Please see issue https://github.com/grafana/worldmap-panel/issues/52. It works using location.

Regarding geohash I think you need to use two labels for latitude and longitude instead. Seems like geohash in worldmap is only supported using elasticsearch. See also this issue comment.

I suggest that you have a look at he worldmap documentation/issues in repository of link above for more information.

Marcus

It does work with geohashes for anyone searching for this. This assumes that you have metrics with labels for geohashes like in the question (exporter_test{country="FR",geo="u09tvrw3xgrb",instance="localhost:2000",job="prometheus"})

  1. Create a query and format as table:
    image
  2. You can switch to the table visualization to see which columns are returned by the query:
    image
  3. Switch back to Worldmap visualization and go to the options. Choose geohash for the Location Data. Choose a column name from the Prometheus query for the geohash, location name and metric fields:
    image
  4. Should now be able to see this on the Worldmap:
1 Like