Jetty has long had a rich set of JMX mbeans that give very detailed status, configuration and control over the server and applications, which can now simply be accessed with the JMiniX web console:

The usability of JMX has been somewhat let down due to a lack of quality JMX management consoles.  JConsole and JVirtualVM do give good access to MBeans, but they rely on a RMI connection which can be tricky to setup to a remote machine.   JMiniX avoids the RMI by allowing access to the MBeans via a servlet you can add to your webapplication.

The instructions were straight forward to follow and the steps were simply:

  1. Add dependency to your pom
  2. Add a repository to your pom (bummer – needs restlet.org which is not in maven central – if it was I’d consider adding JMiniX to our released test webapp)
  3. Define the servlet in your web.xml
  4. Build and run!

You can see by the screen shot above that the console gives a nice rendering of the available mbeans from the JVM and Jetty (and cometd if running). Attributes can be viewed and updated, and operations can be called – all the normal stuff.   It only gives direct mbean access and does not provide any higher level management functions, but this is not a big problem if the mbeans are well designed and self documented.

Also if you wanted to develop more advanced management functions, then the restful nature of JMiniX should make this fairly straight forward.  For example attributes can be retrieved with simple requests like:

That returns JSON like:

JMiniX looks like a great tool to improve the management of your servers and applications and to leverage the value already built into the Jetty JMX mbeans.

We had been working on a similar effort for restful access to JMX, but JMiniX is more advanced.  It does lack some of the features that we had been working on like aggregate access to repeated attributes, but considering the state of JMiniX, we may consider contributing those features to that project instead.

JMiniX JMX console in Jetty

2 thoughts on “JMiniX JMX console in Jetty

  • June 7, 2012 at 9:31 am
    Permalink

    I’m too using JMinix right now, but i’m looking ahead Jolokia ( http://www.jolokia.org/ ), which provides a nice and clean REST publication of JMX beans.

    Sadly there is no real Jolokia dashboard at this time.
    This post about charts integration / jolokia is quite interesting (works very well), even if it’s not a JMX browser (just a JMX visualization mechanism).
    http://nurkiewicz.blogspot.fr/2011/03/jolokia-highcharts-jmx-for-human-beings.html

    I would really unify all my REST JMX access through Jolokia in the end, JMinix seems less easily expandable.

    • June 14, 2012 at 7:47 am
      Permalink

      This is amazing, accessing JMX information in browser is quite convenient. we earlier used MX4j, which also allows you to publish JXM interface via browser. Jetty would be more useful with this addition.

Comments are closed.