An open source python script to fetch weather data OpenWeatherMap and expose it in a Prometheus format.
It can be configured using a YAML file to fetch different locations/cities.
- Unix-like OS
- Python 2.7.x
- Client libraries installes for:
- OpenWeatherMap - pyowm
- Prometheus python client
- fetch data from OpenWeatherMap-API with configurable interval
- configuration file can have city names or long/lat
- data is exposed in Prometheus metrics format
- Clone the project.
- Install the required python libraries:
pip install prometheus_client PyYAML pyowmCopy 'weather.yml.dist' to 'weather.yml' - change the settings to your needs.