Hi All, looking or opinions, thoughts, feedback, etc on an idea that I have for creating a Micrometer persistence service for Item Status metrics.
A few years back the Metrics Service was added, with a focus on openHAB internal/core metrics - the health of the service itself.
This included adding a Micrometer registry to collect said metrics, and a Metrics service to expose those metrics, either for scraping by Prometheus or being sent to InfluxDB.
My thought is that we (I) can build on top of this by adding a Persistence service that creates Micrometer Gauges for Item States, which will be registered with the already existing Micrometer registry that is part of openHAB core. Doing so will automatically expose these Item statuses to Prometheus (my reason for this), but would also allow these to be sent to InfluxDB along with the core internal metrics.
This would be slightly different from the current InfluxDB Persistence service, which also supports InfluxDB v2, and (more importantly?) is able to be queried for Item status to restore states on restart, query historic data, etc. This Micrometer Persistence service would be uni-directional - data goes in, but cannot be pulled back out for use within openHAB itself.
Thoughts? Worth doing and could serve a purpose? I have seen a number of folks asking how to do this, but there has not been much chatter on those topics.
I have not contributed to openHAB yet, other than a few ZWave device definitions, but I am a senior Java engineer / architect for a living, so am comfortable on that side of things.
Thanks in advance for any feedback!