How to use Jmx exporter JavaAgent as a sidecar container
735 views
Skip to first unread message
tantan hngo
unread,
May 12, 2023, 8:29:54 AM5/12/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
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
Doug Hoard
unread,
Jul 10, 2023, 10:45:10 AM7/10/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
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.