lukasmalkmus / tankerkoenig_exporter

A prometheus exporter for the Tankerkoenig API (gas prices).
Apache License 2.0
19 stars 3 forks source link

implement address and geohash labels #3

Closed sfinke0 closed 4 years ago

sfinke0 commented 4 years ago

Hi @lukasmalkmus,

I added the following labels:

With the geohash label you can create quite (imho) cool worldmap panels in Grafana grafana-screenshot-worldmap

With the address / city / brand label you can see more clearly which gas station in the city is displayed Bildschirmfoto 2020-03-12 um 09 23 08

There are some string manipulations in the code now because sometimes the city names are in full caps, streets are with trailing whitespaces and other really annoying stuff.

Please let me know what you think and if there's something you would want me to improve codewise. Still kinda new to go :)

cheers!

sfinke0 commented 4 years ago

Hm I think the build failed due to the missing go mod vendor. Rebased and pushed.

lukasmalkmus commented 4 years ago

Do you mind sharing the Grafana Map setup? Either put it here or add something to the README.md. After this PR lands I want to pin a new minor release.

Do you mind me using your Screenshot in the README for explanation?

sfinke0 commented 4 years ago

Thanks!

Sure there you go. Note: We let Prometheus add a user label because I have set this up for a colleague of mine as well.

query: Bildschirmfoto 2020-03-12 um 09 55 51

worldmap settings: Center setting must be adjusted accordingly if you want your map to start showing somewhere else. Also note the Field Mappings Bildschirmfoto 2020-03-12 um 09 56 15

dashboard variables: Bildschirmfoto 2020-03-12 um 09 57 02

You may use these screenshots if you like :)

lukasmalkmus commented 4 years ago

Thanks dude 🙌

lukasmalkmus commented 4 years ago

I just tagged a new release with your changes.

sfinke0 commented 4 years ago

Awesome! Thank you very much 😄