tags:

views:

336

answers:

3

Hi I would like to monitor a Java application using the browser but at the same time utilise the existing JMX infrastructe.

I know that JMX provides a HTTP interface but I think it provides a standard web gui and its not possible to mashup its functionality with an existing system.

Are you aware of any REST interface for JMX?

My research on google currently shows that there is one project (http://code.google.com/p/polarrose-jmx-rest-bridge/) which does something similar. Is this the only option?

+1  A: 

Tomcat provides a JMX Proxy Servlet in its Manager Application. I don't think it's exactly REST, but it's stateless and is built from simple HTTP requests, so it should be close enough.

Joachim Sauer
A: 

You might want to have a look at jmx4perl. It comes with an agent servlet which proxies REST request to local JMX calls and returns a JSON structure with the answers. It supports read, write, exec, list (list of mbeans) and search operations and knows how to dive into complex data structures via an XPath like expression. Look at the protocol description for more details.

The forthcoming release can deal with bulk (== multiple at once) requests as well and adds the possibility to post a JSON request as alternative to a pure REST GET-request.

In one of the next releases there will support a proxy mode so that no agent servlet needs to be deployed on the target platform, but only on an intermediate, proxy server.

Roland Huß