Performance Zone is brought to you in partnership with:

Toni Epple works as a consultant for Eppleton (http://www.eppleton.de) in Munich, Germany. In his spare time he's an active member of the Open Source community as a community leader for JavaTools community (http://community.java.net/javatools/), moderator of the XING NetBeans User Group (http://www.xing.com/group-20148.82db20), founder of the NetBeans User Group Munich (http://tinyurl.com/5b8tuu), member of the NetBeans Dream Team (http://wiki.netbeans.org/NBDTCurrentMembers) and blogger (http://www.eppleton.de/blog). Toni is a DZone MVB and is not an employee of DZone and has posted 51 posts at DZone. You can read more from them at their website. View Full User Profile

"At least Gerhard is happy now" - JMX and Red hot Chili peppers - Interview

10.25.2012
| 3348 views |
  • submit to reddit

cd17580ff448f5ea564ea58321830a39The Open Source Frameworks Jolokia allows you to use tools like Nagios to monitor Java Virtual Machines. Dr. Roland Huß is the founder and main developer of this project. He's a software architect and head of research and development at ConSol* Software, a consulting company focused on Java development and IT services. At JayDay Munich, Roland will demonstrate Jolokia in his talk "Jolokia - JMX on Capsicain". Here's an interview about his tools:

Roland, your Open Source Framework Jolokia allows Perl- or Javascript -Clients to connect to remote JVMs via JMX. How do you do that, and what's the difference to tools like VisualVM?

RolandhussThe idea for Jolokia or it's predecessor Jmx4Perl is born of necessity. Gerhard Laußer, our Nagios Guru was desperately looking looking for a performant and resource-efficient Solution to monitor many Java Servers via JMX using Nagios. The problem is, that JMX and it's JSR-160 Connectors for remote access, require Java also on the client side. For a Nagios Server monitoring 500 Servers with approx. 10 metrics every 5 minutes that meant starting 15 JVMs per second - using the existing Nagios-JMX-Plugins. Notwithstanding the above JMX in it's standard configuration with RMI is a no-go when monitoring across firewalls.

With Jolokia we deploy an agent in the target system, which accepts REST-like requests via JSON over HTTP and converts them to local MBean calls. That apporach has a couple of advantages: First JSON over HTTP is the "Lingua franca" of the Web, supported by every programming platform. Next there's support for Bulk Request or granular security. The main difference is that Jolokia is not an official standard,  and that you have to install a small (230k) agent. The agent is available in four variants, so you can instrument any kind of Java  Application. For the cases where installing an agent is disallowed, there also is an agent-less proxy setup.

In summary that means that you can create tools in any language. There's even an iPhone client "AccessJ", to manage your JEE Servers.

At least Gerhard is happy now.

So Jolokia allows you to easily create monitoring tools. Can you give us an example, what you can do with it in the real world?

Exhibit A is probably the Nagios-Plugin "check_jmx4perl" in the Jmx4Perl package. Besides performant JMX access, it has a paramount of additional options, that alone would be a topic for a full conference session. But my favorite tool is "j4psh", an interactive Shell with Syntax Highlighting and context aware autocompletion. With Unix-like commands like "cd", "ls" or "cat" you can navigate super fast through the JMX Namespace.

"Aji" is Jolokias little sister. How does "Aji" support her bigger brother?

I guess I'll have to straighten out first, that this is a pure womens household. They're all sisters, Jolokia, Jmx4Perl and Ají ;-)

Well, Ají sits on her bigger sister Jolokia's shoulders and is a JMX User-Interface. The idea is obvious: If we've already got an agent installed, why not add a lightweight single-page-application (SPA)? At the moment there's an MBean-Browser, on the roadmap for version 1 there's also live charts. Unfortunately I'm a bit behind schedule due to day-to-day business, and also because I'm trying to surf on the JavaScript wave. curl.js, CoffeeScript, d3.js, Bootstrap, less, backbone.js, handlebars.js, .... and in addition a robust, automated build (probably using Gradle). A lot of stuff, but it's fun, and I belive it's gonna rock!

What else are you planning for future releases?

Jolokia doesn't support JMX notifications yet. That's at the top of the list. There are different options to implement it, from polling to WebSockets. Additional client libraries are on the list as well, e.g. Groovy, Scala or Python. You can add your own ideas via www.jolokia.org via the forum. But no promises, Jolokia is a leisure project with friendly support from my employer Consol*.

Thanks a lot for the interview!

My pleasure, I'm looking forward to JayDay.

Published at DZone with permission of Toni Epple, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)