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

Example config for Tomcat #902

Open
danlz opened this issue Jan 5, 2024 · 4 comments
Open

Example config for Tomcat #902

danlz opened this issue Jan 5, 2024 · 4 comments

Comments

@danlz
Copy link

danlz commented Jan 5, 2024

https://github.com/prometheus/jmx_exporter/blob/main/example_configs/tomcat.yml

You have to add a rule for exporting the java_lang_operatingsystem_* properties, ie:

 - pattern: 'java.lang<type=OperatingSystem><>(.*):'
   name: java_lang_operatingsystem_$1
   type: COUNTER
@dhoard
Copy link
Collaborator

dhoard commented Jan 23, 2024

@danlz Can you provide usage context? Are you using the exporter in agent mode or standalone mode?

@danlz
Copy link
Author

danlz commented Jan 23, 2024

I'm using it in agent mode.
You are including the java.lang:type=OperatingSystem MBean, but not exposing any of its attributes.

@dhoard
Copy link
Collaborator

dhoard commented Jan 26, 2024

@danlz the issue with adding an OperatingSystem MBean rule is that it's only valid in agent mode. In standalone mode, the OperatingSystem MBean would refer to the standalone exporter's JVM which would produce misleading metrics.

I'm inclined to remove "java.lang:type=OperatingSystem" from the whitelistObjectNames configuration.

Thoughts?

@danlz
Copy link
Author

danlz commented Jan 26, 2024

ok, the config will be consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants