Monitoring WSO2 ESB [ Documentation Index ]

Monitoring WSO2 Enterprise Service Bus (ESB)

This guide describes how to monitor WSO2 ESB using Mediation Statistics component and Java Management Extensions (JMX). WSO2 ESB provides convenient, yet powerful mechanisms for monitoring an ESB deployment. Results provided by ESB Monitoring can be used to tune up message flows, detect mediation faults and track usage patterns.

Contents

Introduction

WSO2 ESB provides variety of options to monitor and manage the server runtime. While it provides number of monitoring tools through the Web-based Management Console, WSO2 ESB also supports Java Management Extensions (JMX) way of monitoring.

Mediation Statistics

Out of monitoring capabilities of WSO2 ESB, the Mediation Statistics feature stands out as one of the most useful and widely used features. From functional components of the ESB, sequences, proxy services and endpoints directly get involved in processing messages. The Mediation Statistics feature enables a server administrator to collect runtime statistical information on these three types of functional components and view them through the Management Console. This feature provides a simple but effective way of determining the runtime performance of the ESB. The collected statistical data can be used to analyze network traffic patterns and draw rough estimates on how the service bus will be used in the future. Perhaps the most enticing attribute of the mediation statistics feature is that it can be configured in a fine grained manner. In other words, it allows a user to collect data on only a specified set of sequences, proxy services and endpoints.

Mediation Statistics component of WSO2 ESB uses an in-memory data store to keep the collected data. The memory usage of the data store is restricted by the total number of statistics collecting proxy services, sequences and endpoints. If the number of proxy services, sequences and endpoints is constant, the memory usage of the mediation statistics component stays constant. Mediation Statistics component also supports persistence as an optional feature. That is, one may configure the ESB to save statistics to the WSO2 Governance Registry instance that comes embedded with the ESB. Mediation Statistics API allows easy sharing of collected data, among Carbon components. Currently WSO2 Business Activity Monitor (BAM) makes use of this API to access data collected by the service bus. Users can also develop custom data consumers to retrieve mediation statistics from the in-memory data store and process them further, using this API.

Enabling Mediation Statistics

Mediation Statistics feature is available with WSO2 ESB out of the box. You do not have to configure anything to use this feature. Simply sign-in to the Management Console and enable statistics on the sequences, proxy services and endpoints you want to monitor, and the service bus will start collecting data on them. For an example, in order to enable statistics for a sequence, click on Service Bus > Sequences in the left menu and simply click on the Enable Statistics icon corresponding to that sequence.

Enabling Mediation Statistics

Figure 1: Enabling mediation statistics for a sequence

To enable statistics for a mediation component using the Synapse configuration language, set the value of the "statistics" attribute to "enabled" on the sequence, proxy or endpoint configuration.

Viewing Mediation Statistics

To view the gathered statistics, click Monitor > Mediation Statistics. You will be shown a graphical summary of all collected statistics.

Viewing Mediation Statistics

Figure 2: Viewing mediation statistics

Starting from this view, you can drill down to see more fine grained data such as statistics pertaining to a single sequence or a proxy service. You can even get statistics for different operations on the same endpoint. Click Proxy Service Statistics link in the upper right corner box of the UI shown in Figure 2 to view a summary of Proxy Service Statistics (Figure 3)

Viewing Mediation Statistics

Figure 3: Mediation statistics of all proxy services

Select a proxy service from the "Proxy Services" list shown above to view statistics of that proxy service.

Viewing Mediation Statistics

Figure 4: Mediation statistics of a proxy service

Transport Statistics, System Statistics and System Logs

WSO2 ESB Management Console provides ways to monitor System Statistics, Transport Statistics and System Logs.

SOAP Tracer and Mediation Tracer are some additional monitoring tools provided by WSO2 ESB.

JMX Monitoring

WSO2 ESB exposes number of management resources as JMX MBeans that can be used for managing and monitoring the running server. These MBeans can be accessed remotely using a JMX client such as JConsole. When WSO2 ESB is starting up, it will display the JMX Service URL in the console as follows.

    INFO - JMXServerManager JMX Service URL :         service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi
    

This URL can be used to remotely access the JMX Service exposed by WSO2 ESB. In this guide, we will use JConsole as the JMX client to access this service.

Using JConsole for JMX Monitoring

Start JConsole and enter the above URL as the JMX Service URL. Type "admin" in both username and password fields and click "Connect".

JConsole Login

Figure 5: Connecting to the JMX service using JConsole

After successfully connecting to the JMX service, click on "MBeans" tab of JConsole to view MBeans exposed by the ESB. As shown in Figure 6, these are listed under org.apache.axis2 and org.apache.synapse nodes. The following section summarizes the attributes and operations available in MBeans exposed by the WSO2 ESB.

JConsole Login

Figure 6: Viewing MBeans exposed by WSO2 ESB

Attributes and Operations of MBeans