This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
JMX Monitoring
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. 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".
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-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.
- org.apache.axis2/Transport/nio-http-listener
- org.apache.axis2/Transport/nio-http-sender
- org.apache.axis2/Transport/nio-https-listener
- org.apache.axis2/Transport/nio-https-sender
Attribute/Operation Name | Description |
ActiveThreadCount | Threads active in this transport listener/sender. |
AvgSizeReceived | Average size of received messages. |
AvgSizeSent | Average size of sent messages. |
MaxSizeReceived | Maximum message size of received messages. |
MaxSizeSent | Maximum message size of sent messages. |
MinSizeReceived | Minimum message size of received messages. |
MinSizeSent | Minimum message size of sent messages. |
MessagesReceived | Total number of messages received through this transport. |
MessagesSent | Total number of messages sent through this transport. |
FaultsReceiving | Number of faults encountered while receiving. |
FaultsSending | Number of faults encountered while sending. |
BytesReceived | Number of bytes received through this transport. |
BytesSent | Number of bytes sent through this transport. |
QueueSize | Number of messages currently queued. Messages get queued if all the worker threads in this transport thread pool are busy. |
ResponseCodeTable | Number of messages sent against their response codes. |
TimeoutsReceiving | Message receiving timeout. |
TimeoutsSending | Message sending timeout. |
LastResetTime | Last time transport listener/sender statistic recording was reset. |
MetricsWindow | Time 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-related MBeans
- org.apache.synapse/NHTTPLatencyView/nio-http
- org.apache.synapse/NHTTPLatencyView/nio-https
- org.apache.synapse/NHTTPS2SLatencyView/nio-http
- org.apache.synapse/NHTTPS2SLatencyView/nio-https
Attribute/Operation Name | Description |
AllTimeAvgLatency | Average latency since latency recording was last reset. |
LastXxxAvgLatency | Average latency for last Xxx time period. For example, LastHourAvgLatency return the average latency for last hour. |
LastResetTime | Last time latency statistic recording was reset. |
reset() | Clear recorded latency statistics and restart recording. |
NttpConnections-related MBeans
- org.apache.synapse/NhttpConnections/http-listener
- org.apache.synapse/NhttpConnections/http-sender
- org.apache.synapse/NhttpConnections/https-listener
- org.apache.synapse/NhttpConnections/https-sender
Attribute/Operation Name | Description |
ActiveConnections | Number of currently active connections. |
ActiveConnectionsPerHosts | A map of number of connections against hosts. |
LastXxxConnections | Number of connections created during last Xxx time period. |
RequestSizesMap | A map of number of requests against their sizes. |
ResponseSizesMap | A map of number of responses against their sizes. |
LastResetTime | Last time connection statistic recordings was reset. |
reset() | Clear recorded connection statistics and restart recording. |
Threading-related 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 Name | Description |
TotalWorkerCount | Total worker threads related to this server/client. |
AvgUnblockedWorkerPercentage | Time-averaged unblocked worker thread percentage. |
AvgBlockedWorkerPercentage | Time-averaged blocked worker thread percentage. |
LastXxxBlockedWorkerPercentage | Blocked worker thread percentage averaged for last Xxx time period. |
 |  |
DeadLockedWorkers | Number of deadlocked worker threads since last statistics reset. |
LastResetTime | Last time thread statistic recordings was reset. |
reset() | Clear recorded thread statistic and restart recording. |
Proxy service-related MBeans
Â
Operation | Description |
---|---|
getServiceRequestCount | Total 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.