Openfire JMX Web Console

Don’t cha wish your openfire console was hawt like me? Don’t cha?

Introducing the openfire jmxweb plugin

I have been using java-monitor.com’s openfire probe for a while now to mange all my openfire servers for a while now and it pretty much works. The plugin and extra JMX mbeans developed by Guus der Kinderen have been very useful for checking the health on the servers. For various reasons which include the work done by Tom Evans to enable JMX for Openfire (Jetty. Mina, Hazelcast) I decided to monitor my openfire servers directly with an open JMX management console instead. I tried both jconsole and jvisualvm, but found them difficult to use with remote servers. I needed a web based console.

After a bit of investigation, I first found jolokia and then hawt.io and together, they are hot and spicey…If you want to know more about both jolokia and hwatio, follow the links. As far as openfire is concerned, hawt.io with jolokia are a perfect fit. The plugin design sits well with openfire’s plugin architecture enabling hawt.io monitor plugins to be developed independently for openfire plugins, components. Anything server-side that can expose mbeans can be monitored and managed by a hawt.io plugin in html and javascript.

I have packaged hawt.io, jolokia and the openfire mbeans from the java-monitor.com probe into a new plugin called jmxweb. It uses the http-bind web service for hawt.io web console and jolokia’s REST API. To access openfire’s JMX mbeans, enable it with global property “xmp.jmx.enabled”. By default, access is secure and only to admin users. Use “xmpp.jmx.secure” to disable.

How to use

To access hawt.io, point your browser at http://your-server:7070/hawt.io

To access jolokia rest api from your javascript applications use URL http://your-server:7070/jolokia. Make sure you provide headers for basic authentication.

The plugin only works with latest openfire server 3.10 because of changes to mina in 3.10. I might do a backward build for openfire 3.9/3.8 if there is any interest.

What next

I plan to release jmxweb on igniterealtime as a new openfire plugin and develop some mbeans for openfire meetings and a hawt.io plugin to manage them later on. It currently lacks the ability to accumulate jmx data on a central server like java-monitor.com over a period of time to analyse and I will look at implementing a push and store feature much later on.

Update

I have attached the jar file for jmxweb plugin that will work with openfire server 3.9.3 and possibly below. Use at your own risk.

Update 2

JmxWeb plugin now available as an Openfire plugin for version 3.10 and above

A discussion space at igniterealtime has also been created.
jmxweb.jar (6512573 Bytes)

2 Likes

Looks so good!Can`t wait to use it.

Great contribution and a good idea ! We are currently using 3.9.3 and were investigating to use hawt.io for the same set of details. It would help us a lot if the same is provided with backward compatibility until 3.9.10 is released. Let us know on this.

Thanks for the kind words

The source code has the changes for openfire before mina upgrade commented out.

I have attached the jar file for jmxweb plugin that will work with openfire server 3.9.3 and possibly below. Use at your own risk.

Thanks for your changes. Will download and try it out.

I see an error…

HTTP ERROR 404

Problem accessing /hawtio. Reason:

Not Found

Any ideas?