Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access JMX enabled application running behind an HTTP proxy server

I have a JMX enabled Java application (Java 1.5) sitting behind an HTTP proxy server. So I cannot access it directly through the JConsole.

A solution I imagine would be to have an in-VM JMX client in my application which collects the statistics and the configuration data from the JMX server and posts it to my external server periodically over HTTP through the proxy. My external server replies back with any configuration changes if needed and the in-VM JMX client propagates those changes to the JMX server which applies them to the application.

I'd guess this to be a scenario frequent enough to have solutions already addressing it. Is there any helper framework/library to enable such access over HTTP?

like image 812
Abhinav Sarkar Avatar asked Oct 10 '22 15:10

Abhinav Sarkar


1 Answers

Not sure this is what you need, but there is a very nice JMX to REST bridge called Jolokia out there. If you add it to your application, you will be able to interact with JMX through REST interface that will be accessible via HTTP proxy like any other HTTP traffic. So not only you are tunneling JMX through HTTP, but you are also exposing it in much nicer format (JSON over HTTP).

It has pretty good documentation, also see my showcase.

like image 103
Tomasz Nurkiewicz Avatar answered Oct 20 '22 06:10

Tomasz Nurkiewicz