Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics service not reporting thing properties #11088

Closed
utdrmac opened this issue Aug 7, 2021 · 6 comments
Closed

Metrics service not reporting thing properties #11088

utdrmac opened this issue Aug 7, 2021 · 6 comments
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@utdrmac
Copy link

utdrmac commented Aug 7, 2021

Running OH 3.1.0 in docker with working ZWave+devices
Installed the 'Metrics service 3.1.0' (@pravussum this yours?)
Checked /rest/metrics/prometheus and not seeing any properties of my zwave devices

Expected Behavior

Expecting to be able to see the values of the channels provided by my zwave devices (temp, on/off state, kwh, etc) so i can scrape them into prometheus for grafana viewing.

Current Behavior

Not showing properties of channels.
No smarthome_event_count of any kind in output.
Showing lots of irrelevant java stuff.

@utdrmac utdrmac added the bug An unexpected problem or unintended behavior of an add-on label Aug 7, 2021
@pravussum
Copy link
Contributor

The metric service is intended to expose metrics about openhab internals in order to monitor the state/health of the system (e.g. "irrelevant Java stuff"). What you expect (exposing thing properties) would rather be done by persistence addons, like the one for InfluxDB: https://www.openhab.org/addons/persistence/influxdb/
AFAIK, there is none for Prometheus yet (although thats a nice feature request). If you're just interested in the Grafana graphs you probably should go with Influx. If you specifically want Prometheus, you'll have to wait until someone gets bored and jumps in to implement it. Shouldn't be too hard, though. 😎

@kaikreuzer
Copy link
Member

@pravussum is right, the metric service does not cover binding specific metrics.

If there are any metrics in Z-Wave that make sense to be exposed in general, it could also be an option to make the Z-Wave binding provide such metrics through the micrometer API. But this would require a PR/issue in https://github.com/openhab/org.openhab.binding.zwave and not here in this repo.

@utdrmac
Copy link
Author

utdrmac commented Aug 8, 2021

@pravussum Thanks for the reply. I did see the influxdb plugin, but felt that it was redundant to store time series data there first then scrape it only to store it yet again in my prometheus+grafana container which has all my other "house metrics". Maybe I can tweak retention to 2 days so won't be that much overhead.

@utdrmac
Copy link
Author

utdrmac commented Aug 8, 2021

@pravussum Sorry, I just read this:

Currently the following metrics are provided:

openHAB events counts (per topic)
openHAB bundle states
openHAB thing states
...

If my motion sensor is a "thing" and that "thing" has a motion state and temperature state, shouldn't those be provided per the documentation?

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/proposal-micrometer-persistence-service/147306/11

@scotthraban
Copy link

I know this is stale and closed, but I believe that my proposal here in the forums would nicely answer this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

5 participants