Skip to content

simonkrenger/avelon-cloud-prometheus-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Avelon Cloud Prometheus Exporter

Prometheus Exporter for Avelon Cloud IoT Devices (https://iot.avelon.cloud/)

Building and running

To build the exporter, do it natively or use the included Dockerfile to build a container:

# Build and run natively
go build
                   
export DEVICE_LIST=ABCDE2F1BCJK65C0,ABCDE2F1BCJK65C1
./avelon-cloud-prometheus-exporter

# Build and run the container
docker build -t quay.io/simonkrenger/avelon-cloud-prometheus-exporter:latest .
docker run --rm -p8080:8080 -e DEVICE_LIST='ABCDE2F1BCJK65C0,ABCDE2F1BCJK65C1' quay.io/simonkrenger/avelon-cloud-prometheus-exporter:latest

The exporter is configured via the DEVICE_LIST environment variable, which is a comma-seperated list of device codes (Found in Avelon Cloud for your device).

Fields exported

Apart from common exporter fields, here is an example of exported gauges:

$ curl http://localhost:8080/metrics
# HELP avelon_device_altitude_msl Current device altitude
# TYPE avelon_device_altitude_msl gauge
avelon_device_altitude_msl{activationcode="ABCDE2F1BCJK65C0"} 1493
avelon_device_altitude_msl{activationcode="ABCDE2F1BCJK65C1"} 1493
# HELP avelon_device_battery_level_percent Current device battery level
# TYPE avelon_device_battery_level_percent gauge
avelon_device_battery_level_percent{activationcode="ABCDE2F1BCJK65C0"} 100
avelon_device_battery_level_percent{activationcode="ABCDE2F1BCJK65C1"} 100
# HELP avelon_device_signal_strength Current device signal strength
# TYPE avelon_device_signal_strength gauge
avelon_device_signal_strength{activationcode="ABCDE2F1BCJK65C0"} 2
avelon_device_signal_strength{activationcode="ABCDE2F1BCJK65C1"} 1
# HELP avelon_record_last_humidity_percent Latest air humidity measurement
# TYPE avelon_record_last_humidity_percent gauge
avelon_record_last_humidity_percent{activationcode="ABCDE2F1BCJK65C0"} 54
avelon_record_last_humidity_percent{activationcode="ABCDE2F1BCJK65C1"} 63.5
# HELP avelon_record_last_pressure_hpa Latest air pressure measurement
# TYPE avelon_record_last_pressure_hpa gauge
avelon_record_last_pressure_hpa{activationcode="ABCDE2F1BCJK65C0"} 1009.404375
avelon_record_last_pressure_hpa{activationcode="ABCDE2F1BCJK65C1"} 1009.76359375
# HELP avelon_record_last_temperature_celsius Latest temperature measurement
# TYPE avelon_record_last_temperature_celsius gauge
avelon_record_last_temperature_celsius{activationcode="ABCDE2F1BCJK65C0"} 12.600000000000023
avelon_record_last_temperature_celsius{activationcode="ABCDE2F1BCJK65C1"} 9.700006103515648

About

Prometheus Exporter for Avelon Cloud IoT devices

Topics

Resources

Stars

Watchers

Forks