← Back to context

Comment by 0xC0ncord

2 years ago

I wrote a Prometheus exporter for metrics gathered from the air conditioning unit in my home lab. The A/C unit has a slot for a network management card (NMC) which is a tiny Linux machine that exposes a web interface and SNMP while communicating with the A/C. I wanted to just use SNMP for this but for some reason there isn't any useful data specific to the A/C being exported, only typical Linux machine data. I did some additional searching and found that there was an API available on the web interface and sought to just scrape that instead.

Normally I would have written this kind of thing in Python since I'm more familiar with the language, but I wanted to take the plunge into Rust and this is the first project I created using it. There's still a couple bugs that I haven't gotten around to fixing like finding out why the Prometheus metrics descriptions don't get displayed in Grafana or finding out why the NMC itself just seems to need to be manually rebooted every few weeks. Other than that it's been working great.

https://github.com/0xC0ncord/padm_exporter