Hi,
You can make your own bundle by doing the same as we do in Decanter by
adding your own metrics:
https://github.com/apache/karaf-decanter/blob/main/appender/prometheus/src/main/java/org/apache/karaf/decanter/appender/prometheus/PrometheusServlet.java
If you just want to export JMX MBean you can use the jmx exporter from
Prometheus:
https://github.com/prometheus/jmx_exporter
And adding this to the JAVA_OPTS env:
-javaagent:./jmx_prometheus_javaagent-0.17.2.jar=44444:config.yaml
Regards,
Francois
On 02/12/2022 03:28, Mark Derricutt wrote:
Hey all,
Anyone got any pointers for exporting metrics from Karaf to Prometheus?
I have jolokia enabled but would rather not write a custom mapping
from that to prometheus.
I’m currently experimenting with a bundle wrapping Micrometer but
fighting imports/exports at the moment.
I do see some years ago
https://github.com/bobpaulin/karaf-prometheus and a thread about it
[1], but not sure if that went anywhere/or is maintained - not sure if
Bob Paulin is still around here?
Decanter is a full-on solution, but I really only need a prometheus
export to feed into our existing stack.
Any solutions? ( Using Karaf 4.4.2 ).
Mark
[1] https://lists.apache.org/thread/o5oyxkgyrytcg1hxro74fwysoo0jqyyx
--
"Great artists are extremely selfish and arrogant things" — Steven
Wilson, Porcupine Tree
--
--
François