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

Introduce core framework metrics #774

Closed
kaikreuzer opened this issue Apr 30, 2019 · 7 comments
Closed

Introduce core framework metrics #774

kaikreuzer opened this issue Apr 30, 2019 · 7 comments

Comments

@kaikreuzer
Copy link
Member

Follow up of this discussion.

We should make use of Eclipse MicroProfile metrics API and provide all kinds of core metrics from openHAB this way - like CPU usage, heap size, number of threads, job queue sizes, event throughput, etc.

Once such information is provided through the API, we can use it to e.g. provide a Prometheus publisher, to provide it through JMX or directly integrate it into the systeminfo binding.

@kaikreuzer
Copy link
Member Author

@pokerazor How much effort would it be to port your implementation to the Eclipse MicroProfile API? I only mean the provider side, not the consuming part.

@pokerazor
Copy link

Hm. Very hard to say for me, as I don't have experience with the Eclipse MicroProfile API ... how could we approach this? What is the aim? What is the downside of using what is currently implemented in the bundle?

Rosi2143 pushed a commit to Rosi2143/openhab-core that referenced this issue Dec 26, 2020
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
@pravussum
Copy link
Contributor

pravussum commented Jan 6, 2021

Following up on the discussion in #2065 here:

Prometheus exporter binding

Please note that it must not be done as a binding, though. Exposing openHAB for Prometheus probably best qualifies as an I/O add-on. Please also note #774, which would be the preferred way of implementation (i.e. by using the MicroProfile API).

@kaikreuzer
My approach is to write the metrics to items in order to let the user choose how to proceed with them.

  • either Prometheus can directly access them via the items state REST API endpoint
  • or it can be further processed / transformed / whatever

Why do you write "must not"? What's the downside?

I'll try to push my WIP version tonight.

@pravussum
Copy link
Contributor

@kaikreuzer What do you think about using Micrometer instead of MicroProfile Metrics?
MP Metrics themselves plan to move towards that direction (implying future effort to migrate it, when going from MP Metrics 3 to 4) and looking at Quarkus, Micronaut and Spring Boot that seems the way to go for me.
https://quarkus.io/blog/micrometer-metrics/

@kaikreuzer
Copy link
Member Author

@pravussum Sounds like a very good point. The situation has changed since the initial discussion a few years back and Micrometer seems indeed being the preferred API for all the frameworks out there - so yes, heading for Micrometer sounds perfectly reasonable!

pravussum pushed a commit to pravussum/openhab-core that referenced this issue Jan 18, 2021
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
pravussum pushed a commit to pravussum/openhab-core that referenced this issue Jan 20, 2021
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
pravussum pushed a commit to pravussum/openhab-core that referenced this issue Jan 20, 2021
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
pravussum pushed a commit to pravussum/openhab-core that referenced this issue Jan 21, 2021
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
pravussum pushed a commit to pravussum/openhab-core that referenced this issue Jan 23, 2021
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
@openhab-bot
Copy link
Collaborator

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

https://community.openhab.org/t/new-add-on-bundle-for-prometheus-health-metrics/48094/46

kaikreuzer pushed a commit that referenced this issue Feb 11, 2021
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
@kaikreuzer
Copy link
Member Author

Implemented with #2133.

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
GitOrigin-RevId: f061512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants