-
Notifications
You must be signed in to change notification settings - Fork 128
Jmx exporter #1201
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
base: main
Are you sure you want to change the base?
Jmx exporter #1201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few observations:
% mvn clean package -Pdist
% cd target
% tar xvf emissary-8.36.0-SNAPSHOT-dist.tar.gz
% METRICS=true ./emissary server -a 1
Picked up JAVA_TOOL_OPTIONS: -javaagent:src/main/resources/metrics/jmx_prometheus_javaagent-1.5.0.jar=9100:src/main/resources/metrics/exporter.yaml
Error opening zip file or JAR manifest missing : src/main/resources/metrics/jmx_prometheus_javaagent-1.5.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Also, do we want to check in this jar to our repo?? Wonder if we could use the dependency or exec plugin to pull this jar on build. We may need to pull this out of the resources dir and create a src/main/metrics (or agents) directory, similar to the config directory. Then we can copy it like the config dir, see the src/assembly/dist.xml.
I expected this not to work.
The jar file doesn't live in the public maven repos currently (at least I couldn't find it) so I have an ick feeling about adding it to our private one.
I like the idea of a src/main/agents directory as long as everyone else is on board with it.
I made the recommended updates and it seems to work. |
|
This looks good and makes sense to me. @jpdahlke do you have an opinion or feedback on including the jar in the repo? |
This change exposes jvm (plus other metrics available in jmx) in the prometheus format via an http endpoint. It is disabled by default. It's worth noting that the jar is not included on the class path and needs to be explicitly included/referenced.
I'm looking for feedback on how best to integrate this functionality.