billykwooten / openweather-exporter

Prometheus exporter utilizing Openweather API (https://openweathermap.org/api) to gather weather metrics.
Apache License 2.0
57 stars 23 forks source link

Multi city support #48

Open ripienaar opened 7 months ago

ripienaar commented 7 months ago

I'd love to gather statistics for a few cities and export them all from one exporter

Would you be open to a PR making it support --city multiple times and starting a collector per city?

billykwooten commented 7 months ago

Yes, that's actually something that is supported if you look at the README for --city, you can actually do something such as `--city "New York, NY|Boston, MA" and separate them with a pipe.

On Tue, Apr 9, 2024 at 9:48 AM R.I.Pienaar @.***> wrote:

I'd love to gather statistics for a few cities and export them all from one exporter

Would you be open to a PR making it support --city multiple times and starting a collector per city?

— Reply to this email directly, view it on GitHub https://github.com/billykwooten/openweather-exporter/issues/48, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXB2FCC4ZKTGHWGY4TRYRTY4PWSVAVCNFSM6AAAAABF6T2P4OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTGNBYGU3DQMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Thank you,

Billy Kyle Wooten @.***

ripienaar commented 7 months ago

Ah all right, missed that!, then maybe a small PR just to make Strings in kingpin so you can pass city multiple times as a more idiomatic way?