The Java agent version (jmx_prometheus_javaagent.jar) is meant to run as an agent attached to the application (in your case Tomcat.) If you want to run as a sidecar, I suspect you want the standalone version (jmx_prometheus_httpserver.jar.)
The integration tests have good examples of usage. Java agent usage: https://github.com/prometheus/jmx_exporter/tree/release-0.19.0/integration_test_suite/integration_tests/src/test/resources/io/prometheus/jmx/test/MinimalTest/JavaAgent Standalone usage: https://github.com/prometheus/jmx_exporter/tree/release-0.19.0/integration_test_suite/integration_tests/src/test/resources/io/prometheus/jmx/test/MinimalTest/Standalone On Friday, May 12, 2023 at 8:29:54 AM UTC-4 tantan hngo wrote: > As title suggests, I want to run the javaagent in the same pod as our > Tomcat. > How do I run the javaagent commands towards our .war file that is in the > other container? > > I tried just running the agent by itself and let it listen on the port > that we've defined in our tomcat to expose its JMX but nothing. > > I get various errors depending on how I do things like; httpserverclass > missing error, no main manifest attribute in jmx_prom_javagent.jar etc > > Any ideas? <3 > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/7dab888b-acbe-4954-9e08-0ddbf8b44c24n%40googlegroups.com.

