Hi all! I just ordered my IoTaWatt last night, and I’m pretty excited to get the unit and get it installed.
For most of my home automation and monitoring solutions, I use a system called Prometheus as a data store. It is similar in nature to InfluxDB, although a bit more specialized. I have alerting and graphing (Grafana) capabilities linked up with my Prometheus installation.
Prometheus functions differently than InfluxDB, et al.; it uses a pull model rather than a push model. The Prometheus server reaches out to other systems over HTTP and queries /metrics (or a configurable URL), which respond with the current status of the system being monitored in a text-based format (example: https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-format-example). Prometheus queries /metrics on a fixed schedule (eg. every 30s, 60s, …), and records this information into Prometheus’ time-series database.
I’d like to contribute an update to the IoTaWatt firmware to support a /metrics endpoint for Prometheus collection. But before I do this development work, I wanted to reach out to see whether such an addition would be welcome as a contribution; I don’t want to support my own custom firmware forever. If this wasn’t welcome, I would just write an external tool to bridge Prometheus -> Tool -> IoTaWatt.
A Prometheus firmware contribution would effectively look like a copy of the
handleStatus /status HTTP handler, but reformatting the output in the Prometheus-supported format. And I’d be happy to include documentation, and follow any recommended best-practices for development.
Would this contribution be welcomed, or would it be better to implement this as an independent piece of software bridging to the existing HTTP data sources?