views:

19

answers:

1

I am using Nagios for monitoring - and looking at NPRE for various monitoring on a given box. I have some java processes - would be nice to "peek into them" via JMX etc.. I can't see a way to do this without starting up a JVM and connecting remotely?

Any ideas?

A: 

I believe you can connect to JMX services via RMI-IIOP, which I believe is CORBA for Java. I believe this means you can use any COBRA client to connect to a RMI-IIOP Java service. Check out JBoss IIOP, which does what you want, I believe, only it's JBoss-specific.

Perhaps it might be easier to simply wrap the JMX services you wanna export using JAX-WS or JAX-RS (i.e., as web services)? Then you can use plain ol' HTTP to access what you want.

In fact, it seems someone has done exactly that! I presume you would like access to something like:

  • http://<host>:<port>/rest/jmx/java.lang:type=Memory/NonHeapMemoryUsage/commited

The entire project is available at https://opendmk.dev.java.net/contributions/rest-adaptor/readme.html :

Restful JMX Adaptor

This Project OpenDMK contribution offers an HTTP access to JMX information in a RestFul way. An article published in the JMX NetBeans blog, covers in detail the approach.

Another (the same?) project is available at https://ws-jmx-connector.dev.java.net/

The Alchemist
heh - I ended up doing a simple ad-hoc version of the RESTful thing by accident (a few lines of code) but that is good to know ! I wasn't insane after all !
Michael Neale