This documentation is for WSO2 Enterprise Service Bus version 4.9.0 . View documentation for the latest release.

All docs This doc
Skip to end of metadata
Go to start of metadata

WSO2 ESB exposes a 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. This page describes how to monitor the ESB using JMX in the following sections:

JMX service URL

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. The following section describes how to use JConsole as the JMX client to access this service.

Using JConsole

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

Make sure that the user ID you are using for JMX monitoring is assigned a role which has the Server Admin permission in the Permissions of the Role page. See Configuring Roles for further information about configuring roles assigned to users.

Tip

If you are intending to establish a remote connection (over a network or into a VM), make sure that the server has been started with the -Djava.rmi.server.hostname=<IP_ADDRESS_WHICH_YOU_USE_TO_CONNECT_TO_SERVER> option. For more information read Troubleshooting Connection Problems in JConsole.

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

Attributes and Operations of MBeans

Transport MBeans

For each transport listener and sender enabled in the ESB, there will be an MBean under the org.apache.axis2/Transport node that has the following attributes and operations. For example, when the JMS transport is enabled, the following MBean will be exposed:

  • org.apache.axis2/Transport/jms-sender-n

Additionally, the MBeans under the org.apache.synapse/Transport node expose these attributes for the default HTTP and HTTPS transports:

  • org.apache.synapse/Transport/passthru-http-receiver
  • org.apache.synapse/Transport/passthru-http-sender
  • org.apache.synapse/Transport/passthru-https-receiver
  • org.apache.synapse/Transport/passthru-https-sender
Attribute/Operation NameDescription
ActiveThreadCountThreads active in this transport listener/sender.
AvgSizeReceivedAverage size of received messages.
AvgSizeSentAverage size of sent messages.
MaxSizeReceivedMaximum message size of received messages.
MaxSizeSentMaximum message size of sent messages.
MinSizeReceivedMinimum message size of received messages.
MinSizeSentMinimum message size of sent messages.
MessagesReceivedTotal number of messages received through this transport.
MessagesSentTotal number of messages sent through this transport.
FaultsReceivingNumber of faults encountered while receiving.
FaultsSendingNumber of faults encountered while sending.
BytesReceivedNumber of bytes received through this transport.
BytesSentNumber of bytes sent through this transport.
QueueSizeNumber of messages currently queued. Messages get queued if all the worker threads in this transport thread pool are busy.
ResponseCodeTableNumber of messages sent against their response codes.
TimeoutsReceivingMessage receiving timeout.
TimeoutsSendingMessage sending timeout.
LastResetTimeLast time transport listener/sender statistic recording was reset.
MetricsWindowTime difference between current time and last reset time in milliseconds.
resetStatistics()Clear recorded transport listener/sender statistics and restart recording.
start()Start this transport listener/sender.
stop()Stop this transport listener/sender.
pause()Pause this transport listener/sender which has been started.
resume()Resume this transport listener/sender which is currently paused.
maintenenceShutdown(long gracePeriod)Stop processing new messages, and wait the specified maximum time for in-flight requests to complete before a controlled shutdown for maintenence.

Latency MBeans

These MBeans provide latency statistics for the HTTP and HTTPS transports. For example:

  • org.apache.synapse/PassthroughHTTPLatencyView/passthru-http
  • org.apache.synapse/PassthroughHTTPSLatencyView/passthru-https
Attribute/Operation NameDescription
AllTimeAvgLatencyAverage latency since latency recording was last reset.
LastXxxAvgLatencyAverage latency for last Xxx time period. For example, LastHourAvgLatency return the average latency for last hour.
LastResetTimeLast time latency statistic recording was reset.
reset()Clear recorded latency statistics and restart recording.

Connection MBeans

These MBeans provide connection statistics for the HTTP and HTTPS transports. For example:

  • org.apache.synapse/PassThroughConnections/http-listener
  • org.apache.synapse/PassThroughConnections/http-sender
  • org.apache.synapse/PassThroughConnections/https-listener
  • org.apache.synapse/PassThroughConnections/https-sender
Attribute/Operation NameDescription
ActiveConnectionsNumber of currently active connections.
ActiveConnectionsPerHostsA map of number of connections against hosts.
LastXxxConnectionsNumber of connections created during last Xxx time period.
RequestSizesMapA map of number of requests against their sizes.
ResponseSizesMapA map of number of responses against their sizes.
LastResetTimeLast time connection statistic recordings was reset.
reset()Clear recorded connection statistics and restart recording.

Threading MBeans

These MBeans are only available in the NHTTP transport and not in the default Pass Through transport.

  • org.apache.synapse/Threading/HttpClientWorker
  • org.apache.synapse/Threading/HttpServerWorker
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.

Proxy service MBeans

Navigate to one of the following operations in the org.wso2.carbon/StatisticsAdmin/Operations MBean, type the proxy service name, and press Enter to get statistics for that service:

OperationDescription
getServiceRequestCountTotal requests to this service

getServiceFaultCount

Total faults from this service

getServiceResponseCount

Total responses by this service

getMaxServiceResponseTime

Maximum response time by this service

getMinServiceResponseTime

Minimum response time by this service

getAvgServiceResponseTime

Average response time by this service

You can also go to org.apache.synapse/StatisticsView/StatisticsView/Operations/getSystemProxyServiceStats to get all of these statistics in a single view.

  • No labels