In the legend format field, I think you need to add: {{state}}. This is the label that the worldmap panel will try to match against the keys in the worldPing endpoint data.
I’m sorry for asking question in this post but could you give me hint on how to add json to my worldmap? I’m totaly a noob on these stuff and I don’t know how should I write the url for json and where should I place json file.
I have simply changing the location data to probes and by modifying the json file located at /var/lib/grafana/plugins/grafana-worldmap-panel/dist/data/probes.json
@werookies that’s one way to solve it, especially if it is a static list of probes. Be aware next time you upgrade the plugin then you will lose your changes so save a copy somewhere so you can apply those changes again.
@dorix1990 the problem is that for a website you cannot just place a file somewhere outside of Grafana - you will run into browser security problems. So you can either do the same as the above solution or if you have a webserver (nginx or similar), you can serve a single file:
Think I might add a feature to WorldMap that will read in a custom JSON file. Getting this question quite often.
@werookies can you provide the format of Data you feed to Grafana?
I have the following structure:
and edited probes.json file:
“{
“key”: “ugkz7”,
“latitude”: 64.5562829,
“longitude”: 40.5962809,
“name”: “ARKHANGELSK”
},
{
“key”: “v04pt”,
“latitude”: 46.3432541,
“longitude”: 47.933211,
“name”: “ASTRAKHAN”
}”
But I can’t make it working with probes.
The tricky part is knowing that Metric Field should be Value. Definitely room for improvement here in the plugin. (Also this feature was designed for Elasticsearch so the labels need to be changed too)
For now I’m having following error in console:
anel data error: Error: Missing geohash value
at decodeGeoHash (geohash.js:2)
at eval (data_formatter.js:97)
at Array.forEach ()
at eval (data_formatter.js:95)
at Array.forEach ()
at DataFormatter.setGeohashValues (data_formatter.js:71)
at WorldmapCtrl.onDataReceived (worldmap_ctrl.js:132)
at o.emit (index.js:129)
at t.emit (emitter.ts:13)
at WorldmapCtrl.e.handleQueryResult (metrics_panel_ctrl.ts:297)
Hello everyone, I hope you are good.I need your help.I read all topics but I didn’t some things.I have Grafana v6.0.2 ,Prometheus 2.9.2 and WorldMap Plugin.I added datasource Prometheus on the Grafana,I can access to Prometheus on the web interface.Everything is working actualy.But I want add pin for some country or state on the World Map Plugin.I found probes.json on Grafana (/var/lib/grafana/plugin***/data) Should I add some query on the world map? What is the next step? I don’t know.This project very important for me,could you help me pls?