SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Jolokia - JMX on Capsaicin
Roland Huß

Chili-Head
ConSol* Software GmbH
Me and the Chili

• Development and Operations @ ConSol
 –   Large Java Projects
 –   Remote Operations
 –   Open Source Monitoring (Nagios)
 –   www.consol.com
• Open Source Author
 – roland@cpan.org
 – https://github.com/rhuss
• Chili grower since 2005
                                        2
JMX
      JSR-3
   JSR-160
The Problem
JMX Refresher

• Java Management Extensions (JMX)
• JSR-3 (2000)
• Available out of the box since JDK 1.5
• JMX-Operations:
 – Attribute reading
 – Attribute writing
 – Execution of operations
 – Notifications


                                           4
JMX Architecture




                   5
JMX Remote API

• JSR-160 (2003)
• Problems:

    – Firewalls
    – Security is typically „all-or-nothing“
    – Strongly typed
    – Java only


                                               6
Jolokia
   Overview
   Features
     Clients
      Tools
How it works




               8
Agents


         JEE
         OSGi
         Mule
         JVM
                9
Tested on ...
Tomcat         5.5, 6.0, 7.0      Felix              2.0, 3.2, 4.0
                                                       3.5, 3.6,
Jetty        5.1, 6.1, 7.5, 8.0   Equinox            3.7, 3.8 M1
              9.2.3, 10.0.2,
Weblogic         10.3.5           Knopflerfish             3.2

Websphere      6.1, 7.0, 8.0      Virgo                2.1, 3.0

Glassfish       2.1, 3.0, 3.1      Spring dm Server       2.0

JBoss        4.2, 5.1, 6.1, 7.0   Mule               2.2, 3.1, 3.2

Jonas         4.10, 5.1, 5.2      ActiveMQ               5.5

Geronimo     2.1, 2.2, 3.0 M1     Terracotta             3.2

Camel               2.8           Hadoop                0.20         10
Quickstart




             11
Request

• HTTP GET
http://localhost/jolokia/read/java.lang:type=Memory/HeapMemoryUsage



• HTTP POST
             {
                 "type":"read",
                 "mbean":"java.lang:type=Memory",
                 "attribute":"HeapMemoryUsage"
             }



                                                                      12
Response

{
        "value": {
                     "init": 134217728,
                     "max": 532742144,
                     "committed": 133365760,
                     "used": 19046472
                 },
        "status": 200,
        "timestamp": 1244839118,
        "request": {
                      "mbean": "java.lang:type=Memory",
                      "type": "read",
                      "attribute": "HeapMemoryUsage"
                    }
    }
                                                          13
Request Types


version   Version and server information

read      Reading of attributes

write     Writing of attributes

exec      Execution of operations

search    Pattern search for MBeans

list      MBean meta data


                                           14
Bulk Requests

 [
     {
          "type" : "read",
          "mbean" : "java.lang:type=Memory",
          "attribute" : "HeapMemoryUsage",
          "path" : "used",
     },
     {
          "type" : "search",
          "mbean" : "*:type=Memory,*"
     }
 ]

                                               15
JSR-160 Proxy




                16
Proxy Request


{
    "attribute" : "HeapMemoryUsage",
    "mbean" : "java.lang:type=Memory",
    "target": {
       "url" : "service:jmx:iiop://websphere:2810/jndi/JMXConnector"
       "user" : "roland",
       "password" : "s!cr!t"
    },
    "type" : "READ"
}




                                                                   17
Security

• JSR-160 Security
 – Java Security and JAAS
• Jolokia Security
 – HTTP Security
 – Access Control with Policy Files
   • Network location
   • Command types
   • MBean, attribute and operation names



                                            18
Clients

Perl         Jmx4Perl
Javascript   Jolokia
Java         Jolokia
Python       Jmx4Py           Jürgen Herrmann
Node.js      jolokia-client   Joachim Kainz


Groovy
Scala                     You ?
.....
                                                19
Javascript Demo




                  20
Javascript
var j4p = new Jolokia("/jolokia");
var data = [];

function run() {
  j4p.request({
                 type: "read",
                 mbean: "java.lang:type=Memory",
                 attribute: "HeapMemoryUsage"
              },
              {
                 success: function(resp) {
                   data.push([resp.timestamp,resp.value.used]);
                   $.plot($("#memory"),[data],{ xaxis: { mode: "time" }});
                   setTimeout(run,1000);
                 }
              });
}
run();


                                                                             21
Tools


 jmx4perl         CLI Tool

 check_jmx4perl   Nagios Plugin

 cacti_jmx4perl   Cacti Plugin

 j4psh            JMX Shell

 AccessJ          iPhone Client

 Roo Addon        Spring Roo Addon


                                     22
j4psh




        23
Wrap up

• JMX is good
• JSR-160 connectors are bad
• Jolokia ...

        ... is a JSON-HTTP adaptor to JMX
        ... has unique features
        ... allows for non-Java clients
        ... has good tool support


                                            24
Resources

• www.jolokia.org
    • Reference-Manual: http://www.jolokia.org/reference/html/
    • Forum: http://www.jolokia.org/forum.html
• Blog
    • ConSol Labs: http://labs.consol.de
• Github
    • https://github.com/rhuss/jolokia
• T-Shirts ;-)
    • http://jolokia.spreadshirt.de
• Twitter: @jolokia_jmx
                                                                 25
Questions ?

Contenu connexe

Tendances

Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
Bruce Snyder
 
Concurrency Patterns with MongoDB
Concurrency Patterns with MongoDBConcurrency Patterns with MongoDB
Concurrency Patterns with MongoDB
Yann Cluchey
 

Tendances (20)

Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disqus
 
Mongo performance tuning: tips and tricks
Mongo performance tuning: tips and tricksMongo performance tuning: tips and tricks
Mongo performance tuning: tips and tricks
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with java
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
What is the ServiceStack?
What is the ServiceStack?What is the ServiceStack?
What is the ServiceStack?
 
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's ToolchestMaking MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDBMelbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
 
MongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To TransactionsMongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To Transactions
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
자바 성능 강의
자바 성능 강의자바 성능 강의
자바 성능 강의
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
 
50 New Features of Java EE 7 in 50 minutes @ Devoxx France 2014
50 New Features of Java EE 7 in 50 minutes @ Devoxx France 201450 New Features of Java EE 7 in 50 minutes @ Devoxx France 2014
50 New Features of Java EE 7 in 50 minutes @ Devoxx France 2014
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
 
Introduction to ServiceStack
Introduction to ServiceStackIntroduction to ServiceStack
Introduction to ServiceStack
 
Cloudflare and Drupal - fighting bots and traffic peaks
Cloudflare and Drupal - fighting bots and traffic peaksCloudflare and Drupal - fighting bots and traffic peaks
Cloudflare and Drupal - fighting bots and traffic peaks
 
Concurrency Patterns with MongoDB
Concurrency Patterns with MongoDBConcurrency Patterns with MongoDB
Concurrency Patterns with MongoDB
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula
 
Using advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/JUsing advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/J
 

Similaire à Jolokia - JMX on Capsaicin (Devoxx 2011)

Server Side Javascript
Server Side JavascriptServer Side Javascript
Server Side Javascript
rajivmordani
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
Mohammad Qureshi
 

Similaire à Jolokia - JMX on Capsaicin (Devoxx 2011) (20)

Server Side Javascript
Server Side JavascriptServer Side Javascript
Server Side Javascript
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
(Fios#02) 2. elk 포렌식 분석
(Fios#02) 2. elk 포렌식 분석(Fios#02) 2. elk 포렌식 분석
(Fios#02) 2. elk 포렌식 분석
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Novalug 07142012
Novalug 07142012Novalug 07142012
Novalug 07142012
 
Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)
 
ELK stack at weibo.com
ELK stack at weibo.comELK stack at weibo.com
ELK stack at weibo.com
 
What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new Strategy
 
Mongo scaling
Mongo scalingMongo scaling
Mongo scaling
 
Maintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica SetsMaintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica Sets
 
Linked Process
Linked ProcessLinked Process
Linked Process
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
 
Building and Scaling Node.js Applications
Building and Scaling Node.js ApplicationsBuilding and Scaling Node.js Applications
Building and Scaling Node.js Applications
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The When
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Java >= 9
Java >= 9Java >= 9
Java >= 9
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.js
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Jolokia - JMX on Capsaicin (Devoxx 2011)

  • 1. Jolokia - JMX on Capsaicin Roland Huß Chili-Head ConSol* Software GmbH
  • 2. Me and the Chili • Development and Operations @ ConSol – Large Java Projects – Remote Operations – Open Source Monitoring (Nagios) – www.consol.com • Open Source Author – roland@cpan.org – https://github.com/rhuss • Chili grower since 2005 2
  • 3. JMX JSR-3 JSR-160 The Problem
  • 4. JMX Refresher • Java Management Extensions (JMX) • JSR-3 (2000) • Available out of the box since JDK 1.5 • JMX-Operations: – Attribute reading – Attribute writing – Execution of operations – Notifications 4
  • 6. JMX Remote API • JSR-160 (2003) • Problems: – Firewalls – Security is typically „all-or-nothing“ – Strongly typed – Java only 6
  • 7. Jolokia Overview Features Clients Tools
  • 9. Agents JEE OSGi Mule JVM 9
  • 10. Tested on ... Tomcat 5.5, 6.0, 7.0 Felix 2.0, 3.2, 4.0 3.5, 3.6, Jetty 5.1, 6.1, 7.5, 8.0 Equinox 3.7, 3.8 M1 9.2.3, 10.0.2, Weblogic 10.3.5 Knopflerfish 3.2 Websphere 6.1, 7.0, 8.0 Virgo 2.1, 3.0 Glassfish 2.1, 3.0, 3.1 Spring dm Server 2.0 JBoss 4.2, 5.1, 6.1, 7.0 Mule 2.2, 3.1, 3.2 Jonas 4.10, 5.1, 5.2 ActiveMQ 5.5 Geronimo 2.1, 2.2, 3.0 M1 Terracotta 3.2 Camel 2.8 Hadoop 0.20 10
  • 12. Request • HTTP GET http://localhost/jolokia/read/java.lang:type=Memory/HeapMemoryUsage • HTTP POST { "type":"read", "mbean":"java.lang:type=Memory", "attribute":"HeapMemoryUsage" } 12
  • 13. Response { "value": { "init": 134217728, "max": 532742144, "committed": 133365760, "used": 19046472 }, "status": 200, "timestamp": 1244839118, "request": { "mbean": "java.lang:type=Memory", "type": "read", "attribute": "HeapMemoryUsage" } } 13
  • 14. Request Types version Version and server information read Reading of attributes write Writing of attributes exec Execution of operations search Pattern search for MBeans list MBean meta data 14
  • 15. Bulk Requests [ { "type" : "read", "mbean" : "java.lang:type=Memory", "attribute" : "HeapMemoryUsage", "path" : "used", }, { "type" : "search", "mbean" : "*:type=Memory,*" } ] 15
  • 17. Proxy Request { "attribute" : "HeapMemoryUsage", "mbean" : "java.lang:type=Memory", "target": { "url" : "service:jmx:iiop://websphere:2810/jndi/JMXConnector" "user" : "roland", "password" : "s!cr!t" }, "type" : "READ" } 17
  • 18. Security • JSR-160 Security – Java Security and JAAS • Jolokia Security – HTTP Security – Access Control with Policy Files • Network location • Command types • MBean, attribute and operation names 18
  • 19. Clients Perl Jmx4Perl Javascript Jolokia Java Jolokia Python Jmx4Py Jürgen Herrmann Node.js jolokia-client Joachim Kainz Groovy Scala You ? ..... 19
  • 21. Javascript var j4p = new Jolokia("/jolokia"); var data = []; function run() { j4p.request({ type: "read", mbean: "java.lang:type=Memory", attribute: "HeapMemoryUsage" }, { success: function(resp) { data.push([resp.timestamp,resp.value.used]); $.plot($("#memory"),[data],{ xaxis: { mode: "time" }}); setTimeout(run,1000); } }); } run(); 21
  • 22. Tools jmx4perl CLI Tool check_jmx4perl Nagios Plugin cacti_jmx4perl Cacti Plugin j4psh JMX Shell AccessJ iPhone Client Roo Addon Spring Roo Addon 22
  • 23. j4psh 23
  • 24. Wrap up • JMX is good • JSR-160 connectors are bad • Jolokia ... ... is a JSON-HTTP adaptor to JMX ... has unique features ... allows for non-Java clients ... has good tool support 24
  • 25. Resources • www.jolokia.org • Reference-Manual: http://www.jolokia.org/reference/html/ • Forum: http://www.jolokia.org/forum.html • Blog • ConSol Labs: http://labs.consol.de • Github • https://github.com/rhuss/jolokia • T-Shirts ;-) • http://jolokia.spreadshirt.de • Twitter: @jolokia_jmx 25