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. WSO2 ESB 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 ESB 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 WSO2 ESB.
Enable mediation flow statistics in the
<ESB_HOME>/repository/conf/synapse.propertiesfile as shown below.
- Start the WSO2 ESB server. For more information, see Running the Product.
- Open the JConsole tool and connect to the ESB 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
For details on using JMX monitoring to monitor your ESB server, see JMX Monitoring.