Prometheus exporter to export dht11 temperature + humidity sensor data to prometheus This is to be used on an ESP8266 but I am sure you can run it on other boards with slight modification
- Add ESP8266 To Board Manager
- Select board
- Upload Code
- Add server to prometheus (add in targets parameter)
Connect sensor voltage+ground to any voltage and ground ping on the esp8266 Data pin goes to D4 (data pin 2) you could change this in the code, I just chose a pin closest to power on my board
Server Is Defaulted At http://IP:8663/metrics
Name | Description
--------------------|------------
dhtexp_temperature show temperature reading in celcius
dhtexp_humidit show humidity level reading