4 ms·
Funny coincidence, yesterday I did almost the same thing, though mine's based on lm-sensors and hddtemp: https://github.com/ncabatoff/sensor-exporter https://g
by gophernaught 10y ago
Funny coincidence, yesterday I did almost the same thing, though mine's based on lm-sensors and hddtemp:
https://github.com/ncabatoff/sensor-exporter https://github.com/ncabatoff/sensor-exporter
- andmarios 10y agoNice! I didn't knew about gosensors library. I started with the same path, using github.com/prometheus/client_golang/prometheus, but it exported too many application metrics (an order of magnitude more than the sensors I exported :p), so I went to a more custom approach.
- gophernaught 10y agoMetrics are pretty cheap, unless you have a ton of exporters I wouldn't worry too much about that. Plus it can come in handy: the ZFS exporter I wrote uses a CGO library that had a memory leak, which I discovered thanks to those app metrics. And they made it easy to infer that the leak was in the C heap rather than in Go.
- grobie 10y agoYou can disable the default metrics by using the uninstrumented handler https://godoc.org/github.com/prometheus/client_golang/prometheus#UninstrumentedHandler https://godoc.org/github.com/prometheus/client_golang/promet... It's a best practice to export all available metrics though, you'll likely run into situations where you'll need them. It's not that many time series exported by default which shouldn't cause any problems.