Over a million developers have joined DZone.
Platinum Partner

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

· Java Zone

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.

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.

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}