Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following topics investigate how to monitor WSO2 ESB using Mediation Statistics component and Java Management Extensions (JMX).

Mediation Statistics 
Anchor
mediation
mediation

Mediation statistics are widely-used monitoring 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.

...

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.

...

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

Transport Statistics, System Statistics and System Logs 
Anchor
ManyStats
ManyStats

WSO2 ESB Management Console provides ways to monitor System StatisticsTransport Statistics and System LogsSOAP Tracer and Mediation Tracer are some additional monitoring tools provided by WSO2 ESB.

JMX Monitoring 
Anchor
JMX
JMX

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.

...

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".

...

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.

Attributes and Operations of MBeans

Transport related MBeans: For each transport listener and sender enabled in the ESB, there will be an MBean under org.apache.axis2/Transport node which has following attributes and operations. For example, when http and https transports are enabled following MBeans will be exposed.

...

Attribute/Operation NameDescription
TotalWorkerCountTotal worker threads related to this server/client.
AvgUnblockedWorkerPercentageTime-averaged unblocked worker thread percentage.
AvgBlockedWorkerPercentageTime-averaged blocked worker thread percentage.
LastXxxBlockedWorkerPercentageBlocked worker thread percentage averaged for last Xxx time period.
DeadLockedWorkersNumber of deadlocked worker threads since last statistics reset.
LastResetTimeLast time thread statistic recordings was reset.
reset()Clear recorded thread statistic and restart recording.

SNMP Monitoring
Anchor
SNMP Monitoring
SNMP Monitoring

Simple Network Management Protocol (SNMP) is an Internet-standard protocol for managing devices on IP networks. Given below is how to configure SNMP in WSO2 ESB, which exposes various MBeans via SNMP. 

...

2. Enable SNMP in repository/conf/synapse.properties file by adding the following entry.

 

Code Block
synapse.snmp.enabled=true

3. This enabled the ESB server to monitor MBeans with SNMP. For example:

Code Block
Monitoring Info : OID branch "1.3.6.1.4.1.18060.14" with the following sub-branches:1 - ServerManager MBean

2- Transport MBeans

3 - NHttpConnections MBeans

4 - NHTTPLatency MBeans

5 - NHTTPS2SLatency MBeans

...