Prometheus exporter for Airthings devices.
- Python 3
- Airthings device
- Register your Airthings device to sync with the cloud following the instructions manual
- Check the Airthings app or the web dashboard to obtain your device serial number. This is your client id
- Go to the Airthings Integrations webpage and request an API Client to obtain a client secret
- Install airthings-exporter
pip install airthings-exporter
# Start server (1 device)
airthings-exporter --client-id [client_id] --client-secret [client_secret] --device-id [device_id]
# Start server (2 devices)
airthings-exporter --client-id [client_id] --client-secret [client_secret] --device-id [device_id_1] --device-id [device_id_2]
# Test server works
curl -s localhost:8000
- Airthings View Plus
- Airthings Wave Mini
scrape_configs:
- job_name: 'airthings'
scrape_interval: 5m
scrape_timeout: 10s
static_configs:
- targets: ['localhost:8000']
Airthings API for consumers allows only up to 120 requests per hour. Every scrape in prometheus sends one request per device to the Airthings API. Make sure the configured prometheus scrape interval does not exceed the limit.