spicing up jmx with jolokia (devoxx 2014)
DESCRIPTION
Slides for my "Tools-in-Action" Talk @ Devoxx 2014 The source code for the demos can be found at http://ro14nd.de/talks/2014/devoxx/jolokia-devoxx-2014-demo.tgz The evolution of the Java Management Extensions (JMX) has stalled. Its fossilisation started some years ago but although JMX's future is more than unclear, it is still present in every JVM out there. However, JMX is not without severe issues in a polyglot world with regard to remote access. Jolokia is an open source project which provides an easy HTTP access to JMX not only for Java clients. Originally intended as backbone for lightweight Nagios monitoring, Jolokia is nowadays used as a general purpose management API adopted by platforms such as ActiveMQ or Spring XD and used by HTML5 consoles like hawt.io. This talk gives a detailed overview of Jolokia and its architecture. Jolokia uses an agent based approach where multiple variants with support for many platforms are available. In addition to standard JMX operations, Jolokia provides unique features like bulk requests or policy based security. The live coding part in this presentation demonstrates how easily a custom browser based JMX-JavaScript client can be developed. A live sneak preview of the forthcoming Jolokia 2.0 release finally completes this session.TRANSCRIPT
@ro14nd#Devoxx #jolokia
Spicing up JMX with JolokiaRoland Huß
ConSol* Software
@ro14nd#Devoxx #jolokia
Roland Huß
• Java Developer since ever
• working in Munich @ ConSol*
• Open Source ‣ Jolokia, Jmx4Perl and docker-maven-plugin
‣ www.jolokia.org
‣ labs.consol.de & ro14nd.de
‣ https://github.com/rhuss
• Chili Pepper Grower
@ro14nd#Devoxx #jolokia
JMX
• Java Management Extensions (JSR-3, 2000) ‣ Management: Configuration, Lifecycle Operations, …
‣ Monitoring: Memory Size, Connection Pools ….
• Available in every JVM
• JSR-160: JMX Remote API ‣ Java only
‣ Crossing firewall boundaries is very hard (RMI)
‣ Security is "all-or-nothing"
@ro14nd#Devoxx #jolokia
@ro14nd#Devoxx #jolokia
@ro14nd#Devoxx #jolokia
AgentsJEE
OSGiMuleJVM
@ro14nd#Devoxx #jolokia
Who uses Jolokia ?
• hawt.io ‣ General purpose HTML5 Web Console
• ActiveMQ ‣ Leading Open Source Message Broker
• fabric8 ‣ Open Source Integration Platform (part of JBoss Fuse)
• Spring XD ‣ System for development of Big Data applications
• Spring Boot
@ro14nd#Devoxx #jolokia
Request Types
read Reading of attributes
write Writing of attributes
exec Execution of operations
search MBean search
list MBean metadata
version Version and server information
Demo
@ro14nd#Devoxx #jolokia
@ro14nd#Devoxx #jolokia
What else ?
• Bulk Requests
• JSR-160 Proxy
• Fine grained security via XML policies
• Tooling with Jmx4Perl
• Client-Libs: ‣ JavaScript, Java, Perl (maintained by Jolokia & Jmx4Perl)
‣ Python, node.js, … (others)
@ro14nd#Devoxx #jolokia
Jolokia 2.0• JMX notifications ‣ Polling
‣ (WebSocket, Server Side Events, JMS,….)
• Role based security
• Modularization and Service Hooks ‣ RequestDispatcher (JMX, Spring, ZooKeeper, JNDI, ….)
‣ JSON serializer
‣ Restrictor
Demo
@ro14nd#Devoxx #jolokia
@ro14nd#Devoxx #jolokia
Questions ?
http://www.jolokia.org