Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMX connection to cloudfoundry

I have an app deployed to Cloudfoundry that I've exposed JMX MBeans interfaces for our logging levels. I'd like to connect to the cloudfoundry instances with jconsole. Is this possible? How do I make this happen? What if I'm running more than 1 instance of Tomcat, how do I connect to a specific instance? or does it matter?

like image 287
Dave Avatar asked Nov 30 '25 00:11

Dave


2 Answers

There is currently no way to connect to once specific instance of an application or for that matter any port other than http port via the main Cloud Foundry router.

like image 172
Dan Higham Avatar answered Dec 03 '25 21:12

Dan Higham


In the platform we use an app deployed alongside the Login and UAA components (https://github.com/cloudfoundry/identity-tools/tree/master/varz). It gives read-only access to selected MBeans through a CF-like REST interface. It is opinionated about the most important MBeans to expose and may break on complex object graphs, but you can adapt it if you want. You could rip out the controller and use it in your app or do the same as we do in the platform with a standalone app, deploying your own war and the varz in the same container.

Also see Jolokia for a generic JMX REST wrapper.

like image 20
Dave Syer Avatar answered Dec 03 '25 22:12

Dave Syer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!