SlideShare une entreprise Scribd logo
1  sur  27
Java Management
 Extensions (JMX)
      Basics
Topics Covered
•   Management
    –   Introduction
    –   Tasks
    –   Operational Models
    –   Instrumentation Models

•   Monitoring & Management Features in Java


•   JMX Introduction


•   JMX Architecture
    – Instrumentation Level
    – Agent Level
    – Distributed Services Level

•   Why JMX

•   Epilogue
Management of a System
•   Management of System refers to the activities, methods, procedures, and
    tools that pertain to the Operation, Administration, Maintenance, and
    Provisioning of Managed Systems


•   Management architectures are becoming increasingly integrated within
    distributed managed systems.


•   The goal of management is to ensure that the managed systems operate with
    the efficiency and effectiveness predefined in the quality of service parameters.


•   They can severely impair the performance, if the management strategy is not
    well defined and studied.


•   Management of a System helps us to figure out what is happening.
Management Tasks

•   Monitoring: the ability to capture runtime and historical events from a particular
    component, for reporting and notification purpose. It is a continuous action over the
    execution time of the Managed System.


•   Tracking: the ability to observe aspects of a single unit of work or thread of
    execution across multiple components. It is executed less frequently than the
    Monitoring.


•   Control: the ability to alter the runtime behavior of a managed component (e.g.,
    changing the logging level of an application). This task is executed on a precise
    period from the execution time of the managed system.
Management Operation Models
Polling:
•   The collector is invoked on a regular frequency, and it retrieves and traces the current
    value of a metric or set of metrics from the Managed System.
•   For example, a collector might be invoked every minute to read a host's CPU utilization
    or read the total number of committed transactions from a transaction manager through a
    JMX interface.
•   The premise of a polling pattern is a periodic sampling of a target metric.


Listening:
•   This is a sort of Observer pattern.
•   The collector registers itself as a listener of events with the target Managed System and
    receives a callback whenever the event of interest occurs.


Interception:
•   In this pattern, the collector inserts itself as an interceptor between a target and its caller
    or callers.
•   On each instance of activity that passes through the interceptor, it makes a
    measurement and traces it.
Management Instrumentation Models
Instrumentation allows management of Resources. Most Commonly used
Management Instrumentation Models:
     – Internal instrumentation and
     – External instrumentation.


•   In the Internal Instrumentation, the management object is part of the managed
    resource and management tasks are executed directly on it.


•   External instrumentation is defined and executed outside the managed
    resource.


•   Internal instrumentation might affect more significantly the performance of the
    managed resource rather than the external one.
Monitoring & Management Features in Java
Starting with J2SE 5.0, the Java platform includes the following monitoring and
management features:
• JVM Instrumentation
• Monitoring and Management APIs
• Tools
• Integrated JMX
Monitoring & Management Features in Java
JVM Instrumentation
The Java virtual machine (JVM) is instrumented for monitoring and management, providing
built-in ("out-of-the-box") management capabilities for both remote and local access.




Monitoring and Management APIs
The java.lang.management package provides the interface for monitoring and managing the
JVM. The API provides access to information such as:
• Number of classes loaded and threads running
• Virtual machine uptime, system properties, and JVM input arguments
• Thread state, stack trace of live threads
• Memory consumption
• Garbage collection statistics
• Operating system information, etc
Monitoring & Management Features in Java
Tools
A graphical JMX monitoring tool, jconsole, enables you to monitor the performance of a JVM
and instrumented applications, providing information to help you optimize performance.


Integrated JMX
The JMX API allows you to instrument applications for monitoring and management. The
RMI connector allows this instrumentation to be remotely accessible.
JMX Introduction
•   Java Management Extensions (JMX) specification defines the Management Architecture,
    which enables Management and Monitoring of applications and services.

•   JMX Architecture provides interfaces for defining runtime Monitoring, Management and
    Configuration support for applications.

•   JMX is a standardized means for providing a remotely accessible management interface
    and is an easy way to add a flexible and powerful management interface to an application.

•   JMX standardizes interfaces for monitoring resources that enable anyone to use an
    arbitrary technology to build monitoring applications. These applications can easily access
    the monitored resources communicating through a JMX agent.

•   JMX delivers the three basic monitoring modes: sampling (the pull mode), tracing (the
    push mode) and periodic notification on events. The user is able to choose the most
    suitable mode of delivery of monitoring data that depends on the application.

•   A resource is an entity in the system that needs to be monitoring and/or controlled by a
    management application; resources that can be monitored and controlled are called
    manageable. JMX architecture enables Java applications to become manageable.
JMX Architecture
The JMX architecture is based on a manager and agent model.
The JMX Architecture has three layers:
• Instrumentation
• JMX agent
• Distributed Services
The key components of each
architectural level are listed below:

Instrumentation level
• MBeans (standard, dynamic, open,
   and model MBeans)
• Notification model
• MBean metadata classes

Agent level
• MBean server
• Agent services

Distributed Services Level
• Connectors and Protocol Adapters
• Management Applications
Instrumentation Level
JMX Architecture  Instrumentation Level
  •   The Instrumentation level prepares resources to be manageable. This level defines the
      requirements for implementing JMX manageable resources.

  •   The management interface of a resource is the set of all necessary information and controls
      that a management application needs to operate on the resource.

  •   The instrumentation of a resource allows it to be manageable through the agent level.

  •   The manageable resource exposes a Java object or wrapper that describes its manageable
      features, which makes the resource instrumented so that it can be managed by JMX-
      compliant applications.

  •   This level provides specification for implementing JMX manageable resources.
Managed Beans (MBeans)
JMX Architecture  Instrumentation Level  MBeans
  •   The Java objects which implement resources and their instrumentation are called Managed
      Beans, or MBeans for short.

  •   MBeans must follow the design patterns and interfaces defined in the JMX specification.
      Doing so ensures that all MBeans provide managed resource instrumentation in a
      standardized way.

  •   MBeans do not require knowledge of the JMX agent with which they operate.

  •   The process of inspecting the MBean interface and applying the design patterns is called
      Introspection.

  •   The JMX agent uses introspection to look at the methods and superclasses of a class,
      determine if it represents an MBean that follows the design patterns, and recognize the
      names of both attributes and operations.
Managed Beans (MBeans)
JMX Architecture  Instrumentation Level  MBeans
   •   Objects which are implemented as an MBeans and registered with the agent can be managed
       from outside the agent’s Java virtual machine. Such objects include:
        –   The resources your application wishes to manage
        –   Value-added services provided to help manage resources
        –   Components of the JMX infrastructure that can be managed

   •   The management interface of a standard MBean is composed of:
        –   Its constructors: only the public constructors of the MBean class are exposed
        –   Its attributes: the properties which are exposed through getter and setter methods
        –   Its operations: the remaining methods exposed in the MBean interface
        –   Its notifications: the notification objects and types that the MBean is likely to emit

   •   Different types of resource can be managed using JMX technology, for example an application,
       an implementation of a service, a device or a user.

   •   MBeans can also be used as wrappers for legacy code without a management interface or as
       proxies for code with a legacy management interface.

   •   Developers of applications and devices are free to choose the granularity of objects that are
       instrumented as MBeans.
   •   An MBean might represent the smallest object in an application, or it could represent the entire
       application.
Managed Beans (MBeans)
JMX Architecture  Instrumentation Level  MBeans
   •   JMX defines the following types of MBeans:
        – Standard MBeans are the simplest to design and implement, their management
          interface is described by their method names.
        – Dynamic MBeans must implement a specific interface, but they expose their
          management interface at run-time for greatest flexibility.
        – Open MBeans are dynamic MBeans which rely on basic data types for universal
          manageability and which are self-describing for user-friendliness.
        – Model MBeans are also dynamic MBeans that are fully configurable and
          selfdescribed at run-time; they provide a generic MBean class with default behavior
          for dynamic instrumentation of resources.
        – MXBeans is an MBean that references only a pre-defined set of data types.


   •   Each of these MBeans corresponds to a different instrumentation need.
   •   Standard & MXBeans are Static MBeans
   •   Dynamic, Model & Open are Dynamic MBeans
Notification Model
JMX Architecture  Instrumentation Level  Notification Model

   •   The JMX specification defines a generic Notification Model based on the Java event
       model.

   •   Notifications can be emitted by MBean instances, as well as by the MBean server.

   •   By using a generic event type, this notification model allows any one listener to receive
       all types of events from a broadcaster.

   •   The filter is provided by the listener to specify only those events which are needed. Using
       a filter, a listener only needs to register once in order to receive all selected events of an
       MBean.

   •   Notification filters are usually implemented as callback methods of the listener itself.
Notification Model
JMX Architecture  Instrumentation Level  Notification Model
   •   The JMX notification model relies on the following components:

        – A generic event type, Notification, which can signal any type of management event.

        – The NotificationListener interface, which needs to be implemented by objects
          requesting to receive notifications sent by MBeans.

        – The NotificationFilter interface, which needs to be implemented by objects which act
          as a notification filter. This interface lets notification listeners provide a filter to be
          applied to notifications emitted by an MBean.

        – The NotificationBroadcaster interface, which needs to be implemented by each
          MBean wanting to emit notifications. This interface allows listeners to register their
          interest in the notifications emitted by an MBean.
MBean Meta Data Classes
JMX Architecture  Instrumentation Level  MBean Meta Data Classes

   •   The metadata classes contain the structures to describe all of the components of an
       MBean’s management interface: its attributes, operations, notifications and constructors.

   •   These classes are used both for the introspection of standard MBeans and for the self-
       description of all dynamic MBeans.

   •   For each of these, the metadata includes a name, a description and its particular
       characteristics.

   •   One of the functions of the MBean server at the agent level is to provide the metadata of
       its MBeans.

   •   The different types of MBeans extend the metadata classes in order to provide additional
       information.

   •   The JMX agent exposes all of its MBeans, regardless of their type, through the MBean
       metadata classes.
Agent Level
JMX Architecture  Agent Level

   •   The agent level provides a specification for implementing agents. Management agents
       directly control the resources and make them available to remote management
       applications.

   •   This level builds upon and makes use of the instrumentation level, in order to define a
       standardized agent to manage JMX manageable resources.

   •   The JMX Agent consists of an MBean server and a set of services for handling MBeans.

   •   In addition, a JMX agent will need at least one communications adaptor or connector.

   •   Managers access an agent’s MBeans and use the provided services through a protocol
       adaptor or connector.
MBean Server
JMX Architecture  Agent Level  MBean Server
   •   The Managed Bean server, or MBean server for short, is a registry for objects which are exposed to
       management operations in an agent.


   •   Any object registered with the MBean server becomes visible to management applications. However, the
       Mbean server only exposes an MBean’s management interface, never its direct object reference.


   •   Any resource that you want to manage from outside the agent’s Java virtual machine must be registered
       as an MBean in the server. The MBean server also provides a standardized interface for accessing
       MBeans within the same JVM, giving local objects all of the benefits of manipulating manageable
       resources.


   •   MBeans can be instantiated and registered by:
        –   Another MBean
        –   The agent itself
        –   A remote management application (through the distributed services)


   •   The operations available on MBeans include:
        –   Discovering the management interface of MBeans
        –   Reading and writing their attribute values
        –   Performing operations defined by the MBeans
        –   Getting notifications emitted by MBeans
        –   Querying MBeans based on their object name or their attribute values
Agent Services
JMX Architecture  Agent Level  Agent Services
   •   Agent services are objects that can perform management operations on the MBeans
       registered in the MBean server.

   •   The JMX specification defines the following agent services:
        – Dynamic class loading through the m-let (management applet) service retrieves
           and instantiates new classes and native libraries from an arbitrary network location.
        – Monitors observe an MBean attribute’s numerical or string value and can notify
          other objects of several types of changes in the target.
        – Timers provide a scheduling mechanism based on a one-time alarm-clock
          notification or on a repeated, periodic notification.
        – The relation service defines associations between MBeans and enforces the
          cardinality of the relation based on predefined relation types.
Distributed Services Level
JMX Architecture  Distributed Services Level

   The distributed services level provides the interfaces for implementing JMX managers. This
   level defines management interfaces and components that can operate on agents or
   hierarchies of agents. These components can:
   •   Provide an interface for management applications to interact transparently with an agent
       and its JMX manageable resources through a connector.
   •   Expose a management view of a JMX agent and its MBeans by mapping their semantic
       meaning into the constructs of a data-rich protocol (for example HTML or SNMP).
   •   Distribute management information from high-level management platforms to numerous
       JMX agents.
   •   Consolidate management information coming from numerous JMX agents into logical
       views that are relevant to the end user’s business operations.
   •   Provide security.
Protocol Adaptors and Connectors
•   Protocol adaptors and Connectors make the agent accessible from remote management
    applications. They provide a view through a specific protocol of the Mbeans instantiated and
    registered in the MBean server. They enable a management application outside the JVM to:
     –   Get or set attributes of existing MBeans
     –   Perform operations on existing MBeans
     –   Instantiate and register new MBeans
     –   Register for and receive notifications emitted by MBeans


•   Both connector servers and protocol adaptors use the services of the MBean server in order
    to apply the management operation they receive to the MBeans, and in order to forward
    notifications to the management application.

                       Propagation of a Remote Operation to an MBean
Protocol Adaptors and Connectors
•   Connectors are used to connect an agent with a remote JMX-enabled management application; that is: a
    management application developed using the JMX distributed services. This kind of communication involves
    a connector server in the agent and a connector client in the manager.
•   These components convey management operations transparently point-to-point over a specific protocol. The
    distributed services on the manager side provide a remote interface to the MBean server through which the
    management application can perform operations. A connector is specific to a given protocol, but the
    management application can use any connector indifferently since they have the same remote interface.


•   Protocol adaptors provide a management view of the JMX agent through a given protocol. They adapt the
    operations of MBeans and the MBean server into a representation in the given protocol, and possibly into a
    different information model.
•   Management applications that connect to a protocol adaptor are usually specific to the given protocol. This is
    typically the case for legacy management solutions that rely on a specific management protocol. They access
    the JMX agent not through a remote representation of the MBean server, but through operations that are
    mapped to those of the MBean server.


•   A protocol connector (e.g. the JMX RMI Connector) exposes the MBeans as they are - so a remote client
    sees the same model than a local client.
    A protocol adaptor (e.g. an SNMP adaptor, or HTML adaptor) performs a model mediation - to adapt the
    model to what a client of that protocol (e.g. SNMP Manager, or Web Browser) would expect to see.
Why JMX
•   Enables Java applications to be managed without heavy investment.
    A JMX technology-based agent (JMX agent) can run on most Java technology-enabled devices. Consequently, Java
    applications can become manageable with little impact on their design. A Java application needs only to embed a managed
    object server and make some of its functionality available as one or several managed beans (MBeans) registered in the
    object server. That is all it takes to benefit from the management infrastructure.


•   Provides a standard way to manage Java applications, systems, and networks.

•   Can be used for out-of-the-box management of the Java VM.
    The JVM is highly instrumented using the JMX technology. You can start a JMX agent to access the built-in Java VM
    instrumentation, and thereby monitor and manage a Java VM remotely.


•   Provides a scalable, dynamic management architecture.
    Every JMX agent service is an independent module that can be plugged into the management agent, depending on the
    requirements. JMX solutions can scale from small-footprint devices to large telecommunications switches and beyond.


•   Leverages existing standard Java technologies.

•   Integrates with existing management solutions and emerging technologies.
    The JMX APIs are open interfaces that any management system vendor can implement. JMX solutions can use lookup and
    discovery services and protocols such as Jini network technology and the Service Location Protocol (SLP).
Epilogue
•   The Java Management extensions technology brings unique facilities to such solutions:
    portability, on-demand deployment of management functionality, dynamic and mobility
    services, and security.


•   If you are using JMX to gain insight into what a server application is doing, you need a means
    of identifying and tracking units of work


•   To get the most value out of JMX, you may want to consider at design time what kinds of data
    would be useful to users and operators at run time.


•   With the release of Java 1.5, JMX is built-in and readily usable in even the smallest of
    applications. It is now a simple task to instrument nearly any application and expose important
    monitoring metrics. Custom applications, involving many processes and multiple middleware
    components, may be effectively managed from a remote console.


•   This frees the application developer from the burden of building management instrumentation.
    Application developer no longer need to manually add instrumentation code. The application
    developer can select the information and controls that need to be exposed for management.
THANK
 YOU

Contenu connexe

Tendances

Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02Atv Reddy
 
Audit Tools for Genesys Contact Centers
Audit Tools for Genesys Contact CentersAudit Tools for Genesys Contact Centers
Audit Tools for Genesys Contact CentersCC Expertise
 
WebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsWebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsMårten Gustafson
 
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016Leif Davidsen
 
Mule scopes request_response_scope
Mule scopes request_response_scopeMule scopes request_response_scope
Mule scopes request_response_scopekunal vishe
 
Dotnet Frame Work and Controls
Dotnet Frame Work and ControlsDotnet Frame Work and Controls
Dotnet Frame Work and Controlssunmitraeducation
 
IBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application DevelopmentIBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application DevelopmentAndrew Coleman
 
Introduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerIntroduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerAnt Phillips
 
System center 2012 configutation manager rc2
System center 2012 configutation manager rc2System center 2012 configutation manager rc2
System center 2012 configutation manager rc2Dubravko Marak
 
3433 IBM messaging security why securing your environment is important-feb2...
3433   IBM messaging security why securing your environment is important-feb2...3433   IBM messaging security why securing your environment is important-feb2...
3433 IBM messaging security why securing your environment is important-feb2...Robert Parker
 
Mdop session from Microsoft partner boot camp
Mdop session from Microsoft partner boot campMdop session from Microsoft partner boot camp
Mdop session from Microsoft partner boot campOlav Tvedt
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middlewaresanjoysanyal
 
Contenuti time-based e personalizzati sul cellularde
Contenuti time-based e personalizzati sul cellulardeContenuti time-based e personalizzati sul cellularde
Contenuti time-based e personalizzati sul cellulardeAlberto Lagna
 

Tendances (19)

Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02Embedded 100912065920-phpapp02
Embedded 100912065920-phpapp02
 
Audit Tools for Genesys Contact Centers
Audit Tools for Genesys Contact CentersAudit Tools for Genesys Contact Centers
Audit Tools for Genesys Contact Centers
 
WebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsWebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime Environments
 
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
Expanding your options with the IBM MQ Appliance - IBM InterConnect 2016
 
Mule scopes request_response_scope
Mule scopes request_response_scopeMule scopes request_response_scope
Mule scopes request_response_scope
 
Dotnet Frame Work and Controls
Dotnet Frame Work and ControlsDotnet Frame Work and Controls
Dotnet Frame Work and Controls
 
IBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application DevelopmentIBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application Development
 
Introduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerIntroduction to WebSphere Message Broker
Introduction to WebSphere Message Broker
 
Middleware
MiddlewareMiddleware
Middleware
 
Xandria datasheet
Xandria datasheet Xandria datasheet
Xandria datasheet
 
System center 2012 configutation manager rc2
System center 2012 configutation manager rc2System center 2012 configutation manager rc2
System center 2012 configutation manager rc2
 
3433 IBM messaging security why securing your environment is important-feb2...
3433   IBM messaging security why securing your environment is important-feb2...3433   IBM messaging security why securing your environment is important-feb2...
3433 IBM messaging security why securing your environment is important-feb2...
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
Mdop session from Microsoft partner boot camp
Mdop session from Microsoft partner boot campMdop session from Microsoft partner boot camp
Mdop session from Microsoft partner boot camp
 
Creating templates
Creating templatesCreating templates
Creating templates
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
Contenuti time-based e personalizzati sul cellularde
Contenuti time-based e personalizzati sul cellulardeContenuti time-based e personalizzati sul cellularde
Contenuti time-based e personalizzati sul cellularde
 
Ch10
Ch10Ch10
Ch10
 

En vedette

Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsNima Badiey
 
Java management extensions (jmx)
Java management extensions (jmx)Java management extensions (jmx)
Java management extensions (jmx)Tarun Telang
 
Paris Devops - Monitoring And Feature Toggle Pattern With JMX
Paris Devops - Monitoring And Feature Toggle Pattern With JMXParis Devops - Monitoring And Feature Toggle Pattern With JMX
Paris Devops - Monitoring And Feature Toggle Pattern With JMXCyrille Le Clerc
 
Performance testing and_reporting_with_j_meter by Le Van Nghi
Performance testing and_reporting_with_j_meter by  Le Van NghiPerformance testing and_reporting_with_j_meter by  Le Van Nghi
Performance testing and_reporting_with_j_meter by Le Van NghieXo Platform
 
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)roland.huss
 
Monitoring 101 - Leveraging on the power of JMX
Monitoring 101 - Leveraging on the power of JMXMonitoring 101 - Leveraging on the power of JMX
Monitoring 101 - Leveraging on the power of JMXMartin Gutenbrunner
 
Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)
Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)
Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)Cyrille Le Clerc
 
Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)roland.huss
 
fabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftfabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftroland.huss
 
Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaPrajal Kulkarni
 

En vedette (10)

Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
 
Java management extensions (jmx)
Java management extensions (jmx)Java management extensions (jmx)
Java management extensions (jmx)
 
Paris Devops - Monitoring And Feature Toggle Pattern With JMX
Paris Devops - Monitoring And Feature Toggle Pattern With JMXParis Devops - Monitoring And Feature Toggle Pattern With JMX
Paris Devops - Monitoring And Feature Toggle Pattern With JMX
 
Performance testing and_reporting_with_j_meter by Le Van Nghi
Performance testing and_reporting_with_j_meter by  Le Van NghiPerformance testing and_reporting_with_j_meter by  Le Van Nghi
Performance testing and_reporting_with_j_meter by Le Van Nghi
 
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)
 
Monitoring 101 - Leveraging on the power of JMX
Monitoring 101 - Leveraging on the power of JMXMonitoring 101 - Leveraging on the power of JMX
Monitoring 101 - Leveraging on the power of JMX
 
Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)
Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)
Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)
 
Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)
 
fabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftfabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShift
 
Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
 

Similaire à JMX Introduction

Lab management
Lab managementLab management
Lab managementlogumca
 
Tij3103 topic02 architectures
Tij3103 topic02 architecturesTij3103 topic02 architectures
Tij3103 topic02 architecturesnakomuri
 
J2EE Patterns
J2EE PatternsJ2EE Patterns
J2EE PatternsEmprovise
 
Mule management console
Mule management consoleMule management console
Mule management consoleShanky Gupta
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar PresantationAbhishek Yadav
 
software configuration management
software configuration managementsoftware configuration management
software configuration managementFáber D. Giraldo
 
Product Information - Fuse Management Central 1.0.0
Product Information - Fuse Management Central 1.0.0Product Information - Fuse Management Central 1.0.0
Product Information - Fuse Management Central 1.0.0antonio.carvalho
 
Web Sphere Administration guide – Packaging and Deploying Jee Applications
Web Sphere Administration guide – Packaging and Deploying Jee ApplicationsWeb Sphere Administration guide – Packaging and Deploying Jee Applications
Web Sphere Administration guide – Packaging and Deploying Jee ApplicationsGagandeep Singh
 
Management Tools Desirable features Management Architectures Simple Network ...
Management Tools  Desirable features Management Architectures Simple Network ...Management Tools  Desirable features Management Architectures Simple Network ...
Management Tools Desirable features Management Architectures Simple Network ...jeronimored
 
Genesys framework
Genesys frameworkGenesys framework
Genesys frameworkVishad Garg
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architectureshuchi tripathi
 
MS TechDays 2011 - Configuration Manager 2012 Technical Overview
MS TechDays 2011 - Configuration Manager 2012 Technical OverviewMS TechDays 2011 - Configuration Manager 2012 Technical Overview
MS TechDays 2011 - Configuration Manager 2012 Technical OverviewSpiffy
 
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and MapsTail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and MapsTail-f Systems
 

Similaire à JMX Introduction (20)

Jiro technology
Jiro technologyJiro technology
Jiro technology
 
Lab management
Lab managementLab management
Lab management
 
Network management ppt
Network management pptNetwork management ppt
Network management ppt
 
Tij3103 topic02 architectures
Tij3103 topic02 architecturesTij3103 topic02 architectures
Tij3103 topic02 architectures
 
J2EE Patterns
J2EE PatternsJ2EE Patterns
J2EE Patterns
 
Mule management console
Mule management consoleMule management console
Mule management console
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
software configuration management
software configuration managementsoftware configuration management
software configuration management
 
Product Information - Fuse Management Central 1.0.0
Product Information - Fuse Management Central 1.0.0Product Information - Fuse Management Central 1.0.0
Product Information - Fuse Management Central 1.0.0
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Design pattern
Design patternDesign pattern
Design pattern
 
Web Sphere Administration guide – Packaging and Deploying Jee Applications
Web Sphere Administration guide – Packaging and Deploying Jee ApplicationsWeb Sphere Administration guide – Packaging and Deploying Jee Applications
Web Sphere Administration guide – Packaging and Deploying Jee Applications
 
Management Tools Desirable features Management Architectures Simple Network ...
Management Tools  Desirable features Management Architectures Simple Network ...Management Tools  Desirable features Management Architectures Simple Network ...
Management Tools Desirable features Management Architectures Simple Network ...
 
SCCM 2019 Demo.pptx
SCCM 2019 Demo.pptxSCCM 2019 Demo.pptx
SCCM 2019 Demo.pptx
 
Genesys framework
Genesys frameworkGenesys framework
Genesys framework
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecture
 
MS TechDays 2011 - Configuration Manager 2012 Technical Overview
MS TechDays 2011 - Configuration Manager 2012 Technical OverviewMS TechDays 2011 - Configuration Manager 2012 Technical Overview
MS TechDays 2011 - Configuration Manager 2012 Technical Overview
 
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and MapsTail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Patterns
PatternsPatterns
Patterns
 

Dernier

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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 Takeoffsammart93
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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 Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Dernier (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

JMX Introduction

  • 2. Topics Covered • Management – Introduction – Tasks – Operational Models – Instrumentation Models • Monitoring & Management Features in Java • JMX Introduction • JMX Architecture – Instrumentation Level – Agent Level – Distributed Services Level • Why JMX • Epilogue
  • 3. Management of a System • Management of System refers to the activities, methods, procedures, and tools that pertain to the Operation, Administration, Maintenance, and Provisioning of Managed Systems • Management architectures are becoming increasingly integrated within distributed managed systems. • The goal of management is to ensure that the managed systems operate with the efficiency and effectiveness predefined in the quality of service parameters. • They can severely impair the performance, if the management strategy is not well defined and studied. • Management of a System helps us to figure out what is happening.
  • 4. Management Tasks • Monitoring: the ability to capture runtime and historical events from a particular component, for reporting and notification purpose. It is a continuous action over the execution time of the Managed System. • Tracking: the ability to observe aspects of a single unit of work or thread of execution across multiple components. It is executed less frequently than the Monitoring. • Control: the ability to alter the runtime behavior of a managed component (e.g., changing the logging level of an application). This task is executed on a precise period from the execution time of the managed system.
  • 5. Management Operation Models Polling: • The collector is invoked on a regular frequency, and it retrieves and traces the current value of a metric or set of metrics from the Managed System. • For example, a collector might be invoked every minute to read a host's CPU utilization or read the total number of committed transactions from a transaction manager through a JMX interface. • The premise of a polling pattern is a periodic sampling of a target metric. Listening: • This is a sort of Observer pattern. • The collector registers itself as a listener of events with the target Managed System and receives a callback whenever the event of interest occurs. Interception: • In this pattern, the collector inserts itself as an interceptor between a target and its caller or callers. • On each instance of activity that passes through the interceptor, it makes a measurement and traces it.
  • 6. Management Instrumentation Models Instrumentation allows management of Resources. Most Commonly used Management Instrumentation Models: – Internal instrumentation and – External instrumentation. • In the Internal Instrumentation, the management object is part of the managed resource and management tasks are executed directly on it. • External instrumentation is defined and executed outside the managed resource. • Internal instrumentation might affect more significantly the performance of the managed resource rather than the external one.
  • 7. Monitoring & Management Features in Java Starting with J2SE 5.0, the Java platform includes the following monitoring and management features: • JVM Instrumentation • Monitoring and Management APIs • Tools • Integrated JMX
  • 8. Monitoring & Management Features in Java JVM Instrumentation The Java virtual machine (JVM) is instrumented for monitoring and management, providing built-in ("out-of-the-box") management capabilities for both remote and local access. Monitoring and Management APIs The java.lang.management package provides the interface for monitoring and managing the JVM. The API provides access to information such as: • Number of classes loaded and threads running • Virtual machine uptime, system properties, and JVM input arguments • Thread state, stack trace of live threads • Memory consumption • Garbage collection statistics • Operating system information, etc
  • 9. Monitoring & Management Features in Java Tools A graphical JMX monitoring tool, jconsole, enables you to monitor the performance of a JVM and instrumented applications, providing information to help you optimize performance. Integrated JMX The JMX API allows you to instrument applications for monitoring and management. The RMI connector allows this instrumentation to be remotely accessible.
  • 10. JMX Introduction • Java Management Extensions (JMX) specification defines the Management Architecture, which enables Management and Monitoring of applications and services. • JMX Architecture provides interfaces for defining runtime Monitoring, Management and Configuration support for applications. • JMX is a standardized means for providing a remotely accessible management interface and is an easy way to add a flexible and powerful management interface to an application. • JMX standardizes interfaces for monitoring resources that enable anyone to use an arbitrary technology to build monitoring applications. These applications can easily access the monitored resources communicating through a JMX agent. • JMX delivers the three basic monitoring modes: sampling (the pull mode), tracing (the push mode) and periodic notification on events. The user is able to choose the most suitable mode of delivery of monitoring data that depends on the application. • A resource is an entity in the system that needs to be monitoring and/or controlled by a management application; resources that can be monitored and controlled are called manageable. JMX architecture enables Java applications to become manageable.
  • 11. JMX Architecture The JMX architecture is based on a manager and agent model. The JMX Architecture has three layers: • Instrumentation • JMX agent • Distributed Services The key components of each architectural level are listed below: Instrumentation level • MBeans (standard, dynamic, open, and model MBeans) • Notification model • MBean metadata classes Agent level • MBean server • Agent services Distributed Services Level • Connectors and Protocol Adapters • Management Applications
  • 12. Instrumentation Level JMX Architecture  Instrumentation Level • The Instrumentation level prepares resources to be manageable. This level defines the requirements for implementing JMX manageable resources. • The management interface of a resource is the set of all necessary information and controls that a management application needs to operate on the resource. • The instrumentation of a resource allows it to be manageable through the agent level. • The manageable resource exposes a Java object or wrapper that describes its manageable features, which makes the resource instrumented so that it can be managed by JMX- compliant applications. • This level provides specification for implementing JMX manageable resources.
  • 13. Managed Beans (MBeans) JMX Architecture  Instrumentation Level  MBeans • The Java objects which implement resources and their instrumentation are called Managed Beans, or MBeans for short. • MBeans must follow the design patterns and interfaces defined in the JMX specification. Doing so ensures that all MBeans provide managed resource instrumentation in a standardized way. • MBeans do not require knowledge of the JMX agent with which they operate. • The process of inspecting the MBean interface and applying the design patterns is called Introspection. • The JMX agent uses introspection to look at the methods and superclasses of a class, determine if it represents an MBean that follows the design patterns, and recognize the names of both attributes and operations.
  • 14. Managed Beans (MBeans) JMX Architecture  Instrumentation Level  MBeans • Objects which are implemented as an MBeans and registered with the agent can be managed from outside the agent’s Java virtual machine. Such objects include: – The resources your application wishes to manage – Value-added services provided to help manage resources – Components of the JMX infrastructure that can be managed • The management interface of a standard MBean is composed of: – Its constructors: only the public constructors of the MBean class are exposed – Its attributes: the properties which are exposed through getter and setter methods – Its operations: the remaining methods exposed in the MBean interface – Its notifications: the notification objects and types that the MBean is likely to emit • Different types of resource can be managed using JMX technology, for example an application, an implementation of a service, a device or a user. • MBeans can also be used as wrappers for legacy code without a management interface or as proxies for code with a legacy management interface. • Developers of applications and devices are free to choose the granularity of objects that are instrumented as MBeans. • An MBean might represent the smallest object in an application, or it could represent the entire application.
  • 15. Managed Beans (MBeans) JMX Architecture  Instrumentation Level  MBeans • JMX defines the following types of MBeans: – Standard MBeans are the simplest to design and implement, their management interface is described by their method names. – Dynamic MBeans must implement a specific interface, but they expose their management interface at run-time for greatest flexibility. – Open MBeans are dynamic MBeans which rely on basic data types for universal manageability and which are self-describing for user-friendliness. – Model MBeans are also dynamic MBeans that are fully configurable and selfdescribed at run-time; they provide a generic MBean class with default behavior for dynamic instrumentation of resources. – MXBeans is an MBean that references only a pre-defined set of data types. • Each of these MBeans corresponds to a different instrumentation need. • Standard & MXBeans are Static MBeans • Dynamic, Model & Open are Dynamic MBeans
  • 16. Notification Model JMX Architecture  Instrumentation Level  Notification Model • The JMX specification defines a generic Notification Model based on the Java event model. • Notifications can be emitted by MBean instances, as well as by the MBean server. • By using a generic event type, this notification model allows any one listener to receive all types of events from a broadcaster. • The filter is provided by the listener to specify only those events which are needed. Using a filter, a listener only needs to register once in order to receive all selected events of an MBean. • Notification filters are usually implemented as callback methods of the listener itself.
  • 17. Notification Model JMX Architecture  Instrumentation Level  Notification Model • The JMX notification model relies on the following components: – A generic event type, Notification, which can signal any type of management event. – The NotificationListener interface, which needs to be implemented by objects requesting to receive notifications sent by MBeans. – The NotificationFilter interface, which needs to be implemented by objects which act as a notification filter. This interface lets notification listeners provide a filter to be applied to notifications emitted by an MBean. – The NotificationBroadcaster interface, which needs to be implemented by each MBean wanting to emit notifications. This interface allows listeners to register their interest in the notifications emitted by an MBean.
  • 18. MBean Meta Data Classes JMX Architecture  Instrumentation Level  MBean Meta Data Classes • The metadata classes contain the structures to describe all of the components of an MBean’s management interface: its attributes, operations, notifications and constructors. • These classes are used both for the introspection of standard MBeans and for the self- description of all dynamic MBeans. • For each of these, the metadata includes a name, a description and its particular characteristics. • One of the functions of the MBean server at the agent level is to provide the metadata of its MBeans. • The different types of MBeans extend the metadata classes in order to provide additional information. • The JMX agent exposes all of its MBeans, regardless of their type, through the MBean metadata classes.
  • 19. Agent Level JMX Architecture  Agent Level • The agent level provides a specification for implementing agents. Management agents directly control the resources and make them available to remote management applications. • This level builds upon and makes use of the instrumentation level, in order to define a standardized agent to manage JMX manageable resources. • The JMX Agent consists of an MBean server and a set of services for handling MBeans. • In addition, a JMX agent will need at least one communications adaptor or connector. • Managers access an agent’s MBeans and use the provided services through a protocol adaptor or connector.
  • 20. MBean Server JMX Architecture  Agent Level  MBean Server • The Managed Bean server, or MBean server for short, is a registry for objects which are exposed to management operations in an agent. • Any object registered with the MBean server becomes visible to management applications. However, the Mbean server only exposes an MBean’s management interface, never its direct object reference. • Any resource that you want to manage from outside the agent’s Java virtual machine must be registered as an MBean in the server. The MBean server also provides a standardized interface for accessing MBeans within the same JVM, giving local objects all of the benefits of manipulating manageable resources. • MBeans can be instantiated and registered by: – Another MBean – The agent itself – A remote management application (through the distributed services) • The operations available on MBeans include: – Discovering the management interface of MBeans – Reading and writing their attribute values – Performing operations defined by the MBeans – Getting notifications emitted by MBeans – Querying MBeans based on their object name or their attribute values
  • 21. Agent Services JMX Architecture  Agent Level  Agent Services • Agent services are objects that can perform management operations on the MBeans registered in the MBean server. • The JMX specification defines the following agent services: – Dynamic class loading through the m-let (management applet) service retrieves and instantiates new classes and native libraries from an arbitrary network location. – Monitors observe an MBean attribute’s numerical or string value and can notify other objects of several types of changes in the target. – Timers provide a scheduling mechanism based on a one-time alarm-clock notification or on a repeated, periodic notification. – The relation service defines associations between MBeans and enforces the cardinality of the relation based on predefined relation types.
  • 22. Distributed Services Level JMX Architecture  Distributed Services Level The distributed services level provides the interfaces for implementing JMX managers. This level defines management interfaces and components that can operate on agents or hierarchies of agents. These components can: • Provide an interface for management applications to interact transparently with an agent and its JMX manageable resources through a connector. • Expose a management view of a JMX agent and its MBeans by mapping their semantic meaning into the constructs of a data-rich protocol (for example HTML or SNMP). • Distribute management information from high-level management platforms to numerous JMX agents. • Consolidate management information coming from numerous JMX agents into logical views that are relevant to the end user’s business operations. • Provide security.
  • 23. Protocol Adaptors and Connectors • Protocol adaptors and Connectors make the agent accessible from remote management applications. They provide a view through a specific protocol of the Mbeans instantiated and registered in the MBean server. They enable a management application outside the JVM to: – Get or set attributes of existing MBeans – Perform operations on existing MBeans – Instantiate and register new MBeans – Register for and receive notifications emitted by MBeans • Both connector servers and protocol adaptors use the services of the MBean server in order to apply the management operation they receive to the MBeans, and in order to forward notifications to the management application. Propagation of a Remote Operation to an MBean
  • 24. Protocol Adaptors and Connectors • Connectors are used to connect an agent with a remote JMX-enabled management application; that is: a management application developed using the JMX distributed services. This kind of communication involves a connector server in the agent and a connector client in the manager. • These components convey management operations transparently point-to-point over a specific protocol. The distributed services on the manager side provide a remote interface to the MBean server through which the management application can perform operations. A connector is specific to a given protocol, but the management application can use any connector indifferently since they have the same remote interface. • Protocol adaptors provide a management view of the JMX agent through a given protocol. They adapt the operations of MBeans and the MBean server into a representation in the given protocol, and possibly into a different information model. • Management applications that connect to a protocol adaptor are usually specific to the given protocol. This is typically the case for legacy management solutions that rely on a specific management protocol. They access the JMX agent not through a remote representation of the MBean server, but through operations that are mapped to those of the MBean server. • A protocol connector (e.g. the JMX RMI Connector) exposes the MBeans as they are - so a remote client sees the same model than a local client. A protocol adaptor (e.g. an SNMP adaptor, or HTML adaptor) performs a model mediation - to adapt the model to what a client of that protocol (e.g. SNMP Manager, or Web Browser) would expect to see.
  • 25. Why JMX • Enables Java applications to be managed without heavy investment. A JMX technology-based agent (JMX agent) can run on most Java technology-enabled devices. Consequently, Java applications can become manageable with little impact on their design. A Java application needs only to embed a managed object server and make some of its functionality available as one or several managed beans (MBeans) registered in the object server. That is all it takes to benefit from the management infrastructure. • Provides a standard way to manage Java applications, systems, and networks. • Can be used for out-of-the-box management of the Java VM. The JVM is highly instrumented using the JMX technology. You can start a JMX agent to access the built-in Java VM instrumentation, and thereby monitor and manage a Java VM remotely. • Provides a scalable, dynamic management architecture. Every JMX agent service is an independent module that can be plugged into the management agent, depending on the requirements. JMX solutions can scale from small-footprint devices to large telecommunications switches and beyond. • Leverages existing standard Java technologies. • Integrates with existing management solutions and emerging technologies. The JMX APIs are open interfaces that any management system vendor can implement. JMX solutions can use lookup and discovery services and protocols such as Jini network technology and the Service Location Protocol (SLP).
  • 26. Epilogue • The Java Management extensions technology brings unique facilities to such solutions: portability, on-demand deployment of management functionality, dynamic and mobility services, and security. • If you are using JMX to gain insight into what a server application is doing, you need a means of identifying and tracking units of work • To get the most value out of JMX, you may want to consider at design time what kinds of data would be useful to users and operators at run time. • With the release of Java 1.5, JMX is built-in and readily usable in even the smallest of applications. It is now a simple task to instrument nearly any application and expose important monitoring metrics. Custom applications, involving many processes and multiple middleware components, may be effectively managed from a remote console. • This frees the application developer from the burden of building management instrumentation. Application developer no longer need to manually add instrumentation code. The application developer can select the information and controls that need to be exposed for management.