Java Management Extensions (JMX) is a technology that lets you implement management interfaces for Java applications. JConsole is a JMX-compliant monitoring tool, which comes with the Java Development Kit (JDK) 1.5 or later versions. The ESB profile is shipped with inbuilt support for JMX (Java Management Extension) monitoring.
This section illustrates how you can use JMX monitoring to monitor statistics relating to artifacts that are deployed in your EI server. This is done using the Mediation Flow Statistics View Mbean.
Follow the steps below to enable and view JMX based mediation flow statistics for the ESB profile.
Enable mediation flow statistics in the
<EI_HOME>/conf/synapse.propertiesfile as shown below.
Code Block language xml
mediation.flow.statistics.enable=true mediation.flow.statistics.tracer.collect.payloads=true mediation.flow.statistics.tracer.collect.properties=true
- Start the Analytics profile of WSO2 EI. For more information, see Starting the Analytics profile.
- Start the ESB profile of WSO2 EI. For more information, see Starting the ESB profile.
- Open the JConsole tool and connect to the EI server. For instructions, see Monitoring a WSO2 Product with JConsole in the WSO2 Administration Guide.
- Go to the MBeans tab in the JConsole and navigate to
Mediation Flow Statistic View/MediationFlowStatisticsView/Operationsto view all available operations. In here, you can view JMX statistics relating to proxy services, REST APIs, inbound endpoints, endpoints and sequences.
For example, to view JMX statistics for a proxy service select
getProxyServiceJMXStatisticsfrom the list of operations. Provide the artifact name in p0 field under Composite Data and and click getProxyServiceJMXStatistics button to perform the relevant operation invocation.
The MediationFlowStatisticsView MBean has the following operations:
|resetAPIStatistics||Clear recorded API statistics and restart recording.|
|resetProxyStatistics||Clear recorded proxy service statistics and restart recording.|
|resetSequenceStatistics||Clear recorded sequence statistics and restart recording.|
|resetInboundEndpointStatistics||Clear recorded inbound endpoint statistics and restart recording.|
|resetEndpointStatistics||Clear recorded endpoint statistics and restart recording.|
|resetAllStatistics||Clear recorded statistics for all ESB artifacts and restart recording.|
|getProxyServiceJMXStatistics||Retrieve JMX statistics for proxy service.|
|getSequenceJMXStatistics||Retrieve JMX statistics for sequence.|
|getAPiJMXStatistics||Retrieve JMX statistics for API.|
|getInboundEndpointJMXStatistics||Retrieve JMX statistics for inbound endpoint.|
|getEndpointJMXStatistics||Retrieve JMX statistics for endpoint.|
Disabling the JMX observer
The JMX observer can be disabled by adding the following property to the
<MediationFlowStatisticConfig> <JmxPublishingDisable>true</JmxPublishingDisable> </MediationFlowStatisticConfig>
For details on using JMX monitoring to monitor your ESB profile, see JMX Monitoring .