This is a simple Prometheus exporter that collects data from Qingping API and exposes it in a format that Prometheus can scrape.
Before using the exporter you will have to create a developer account in the Qingping Cloud.
- Download the Qingping+ App and create an account.
- Use your account to create a developer account in the Qingping Cloud.
- Go to your credentials page and take note of your AppKey and AppSecret.
Once you have the credentials you can run the exporter with docker or docker-compose, using our pre-built images published to GitHub Container Registry.
docker run QINGPING_APP_KEY=your_app_key QINGPING_APP_SECRET=your_app_secret ghcr.io/pedro-stanaka/qingping_exporter:latest
Or using docker-compose:
version: '3'
services:
qingping_exporter:
image: ghcr.io/pedro-stanaka/qingping_exporter:latest
environment:
QINGPING_APP_KEY: your_app_key
QINGPING_APP_SECRET: your_app_secret
The exporter collects the following metrics:
Metric Name | Type | Labels | Description |
---|---|---|---|
air_monitor_temperature | Gauge | device_mac | Temperature in degrees Celsius |
air_monitor_humidity | Gauge | device_mac | Humidity percentage |
air_monitor_pm25 | Gauge | device_mac | PM2.5 concentration in µg/m³ |
air_monitor_pm10 | Gauge | device_mac | PM10 concentration in µg/m³ |
air_monitor_co2 | Gauge | device_mac | CO2 concentration in ppm |
air_monitor_battery | Gauge | device_mac | Battery level percentage |
air_monitor_device_info | Gauge | device_name, device_mac, status, product_name, product_code, product_id | Device information |
device_last_data_timestamp | Gauge | device_mac | Last data timestamp |
air_monitor_sync_duration_seconds | Histogram | phase | Duration of the sync request |