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

prometheus - how to set the actual metrics value as metric field #245

Open loomsen opened 4 years ago

loomsen commented 4 years ago

Hi guys.

Thank you for this awesome plugin. I really like it. Now, I want to replace our mysql datasource in grafana with our prometheus to dry up things. Is there a way to set the actual prometheus metrics value as the metrics field in visualization tab? I've tried literally every possible combination of variables and labels, with and without braces, only thing that's working is based on a metrics label. But what's the point of having the circles drawn by IDs?

Consider this query: Selection_360

How would I show that on a worldmap?

Any pointer is highly appreciated so I can finally find back my good nights sleep. :)

amotl commented 4 years ago

Dear Norbert,

does [1] help you in any way?

With kind regards, Andreas.

[1] https://www.robustperception.io/using-geohashes-with-the-worldmap-panel-and-prometheus

amotl commented 4 years ago

183 also gives some hints. Please let me know if that would be something to work on. See also #53.

loomsen commented 4 years ago

Hi Andreas,

thank you for your quick answer :) That was the right pointer. Value is the string to use in the metric field.

Selection_367

Now it's finally working! Thank you very much, it cost me hours and nerves. I will prepare a PR to improve the docs on prometheus (or even just add anything about it).

amotl commented 4 years ago

Dear Norbert,

Now it's finally working!

Good to hear!

Thank you very much, it cost me hours and nerves.

Been there. Welcome!

I will prepare a PR to improve the docs on prometheus (or even just add anything about it).

Please do. It will help everyone using Prometheus. May I humbly ask to add the same to our fork maintained over at [1]? You are also welcome to use that as it will bring you some more features you might like.

With kind regards, Andreas.

[1] https://github.com/panodata/grafana-map-panel