This script fetches weather data from Buienradar and exposes it as Prometheus metrics. It runs a web server to serve these metrics.
docker run -d \
-p 9002:9002 \
--name buienradar_exporter \
maikel09/buienradar-exporter
The script fetches data from Buienradar every 5 minutes, processes it, and exposes it as Prometheus metrics.
buienradar_airpressure
- Air pressure in hPabuienradar_visibility
- Visibility in metersbuienradar_lat
- Latitude of the stationbuienradar_lon
- Longitude of the stationbuienradar_temperature
- Temperature in degrees Celsiusbuienradar_groundtemperature
- Ground temperature in degrees Celsiusbuienradar_feeltemperature
- Feels-like temperature in degrees Celsiusbuienradar_windgusts
- Wind gust speed in meters per secondbuienradar_windspeed
- Wind speed in meters per secondbuienradar_windspeed_bft
- Wind speed on the Beaufort scalebuienradar_humidity
- Humidity in percentagebuienradar_precipitation
- Precipitation in millimetersbuienradar_rain_fall_last_24_hour
- Rainfall in the last 24 hours in millimetersbuienradar_rain_fall_last_hour
- Rainfall in the last hour in millimetersbuienradar_winddirection_degrees
- Wind direction in degreesbuienradar_sun_power
- Sun power in watts per square meterbuienradar_sunrise
- Time of sunrise in epoch secondsbuienradar_sunset
- Time of sunset in epoch secondsbuienradar_weather_description
- Weather description of the stationbuienradar_wind_direction
- Wind direction of the station
buienradar_api_errors_total
- The number of errors encountered while accessing the Buienradar API
HTTP_PROXY
: Set this variable to use an HTTP proxy.HTTPS_PROXY
: Set this variable to use an HTTPS proxy.
The script uses logging
to log information in logfmt
format.
INFO level=info msg="Started Prometheus buienradar exporter on port 9002"
INFO level=info msg="Got data for 10 stations"
INFO level=info msg="Sunrise: 2024-10-13T08:00:00, Sunset: 2024-10-13T18:00:00"
Maikel Wagteveld