Monitoring a system is fundamentally important to understand the health of every other system involved with that system. This includes web servers, application servers, databases, backend systems, and any other systems critical that run a web site. Monitoring an event helps in understanding the performance of every individual transaction and also pinpointing performance problems. This article explains how to monitor an inbound and outbound life cycle of a WebSphere Adapter.
- IBM Integration Designer V7.5 (formerly called IBM WebSphere Integration Developer) and IBM Business Process Manager V7.5 Advanced Edition.
- The WebSphere Adapter type you want to monitor.
- A basic understanding of IBM Integration Designer and WebSphere Adapter. For more information about these products, see the Resources section of the article.
What are the performance tools available to monitor Adapters?
Monitoring and tuning an application are critical to the overall performance of the system. Some of the core monitoring infrastructures are listed below, which will help monitor and tune your application performance:
- Performance Monitoring Infrastructure (PMI)
- Common Base Events (CBE)
- Application Response Monitoring (ARM)
What is PMI?
Performance Monitoring Infrastructure (PMI) is the core monitoring infrastructure for WebSphere Application Server and the WebSphere family of products, such as WebSphere Portal, WebSphere Commerce, and so on. The performance data provided by the WebSphere PMI monitors and tunes application server performance. When tuning WebSphere Application Server for optimal performance, or fixing a poorly performing Java 2 Platform Enterprise Edition (J2EE) application, it is important to understand how the various runtime and application resources are behaving from a performance perspective.
PMI provides a comprehensive set of data that explains the runtime and application resource behavior. For example, PMI provides database connection pool size, servlet response time, Enterprise JavaBeans (EJB) method response time, Java™ virtual machine (JVM) garbage collection time, CPU usage, and so on. You can use this data to understand the runtime resource utilization patterns of the thread pool, connection pool, and so on. This also includes the performance characteristics of the application components, such as servlets, JavaServer Pages (JSP), and enterprise beans.
PMI metrics are collected across different components of WebSphere Application Server for better monitoring, as shown in Figure 1 and Figure 2. Figure 1 shows the description of a PMI service in WebSphere Application Server, and Figure 2 shows the metrics that can be monitored.
Figure 1. PMI service in WebSphere Application Server architecture
Figure 2. PMI metrics monitored in Websphere Application Server
Configuring and monitoring the Adapter to use PMI
When PMI service is enabled, the monitoring of individual metrics can be enabled or disabled dynamically. PMI can be enabled through the administrative console as described in the next section.
- Open the administrative console.
- Click Server > Application Servers in the console navigation tree.
- Click a server.
- Click the Configuration tab.
- Click the Performance Monitoring Infrastructure (PMI) under Performance.
- Select the Enable Performance Monitoring Infrastructure (PMI) check box.
- Optionally, select the check box Use sequential counter updates to enable precise statistic updates.
- Optionally, choose a statistic set that needs to be monitored under Currently Monitored Statistic Set.
- Optionally, click on Custom to selectively enable or disable statistics. Choose the Adapter module from the left side side of the tree and enable or disable the respective metrics on the right side table. Go back to the main PMI configuration page by clicking the Performance Monitoring Infrastructure link.
- Click Apply or OK.
- Click Save.
- Restart the application server. The changes you make will not take effect until you restart the application server.
- A graphical viewer called "Tivoli® Performance Viewer" is
shipped with WebSphere Application Server, which you can use to view
the PMI metrics of the Adapters. Under the current activity, you
see the Tivoli Performance Viewer. Select Start
Monitoring and select the
<serverName>. Under JCAAdapter, you
can monitor the adapter events. You can check the JCA adapter events
under the admin console. Figure 3 shows what the adapter-related
metrics look like.
Figure 3. PMI statistics using WebSphere Adapters
You can view the metrics for these modules with the graphical viewer, as shown in Figure 4.
Figure 4. Graphical representation using the Tivoli Performance Viewer
What is CBE?
The common base event (CBE) format defines a standard message format for the following events:
- Business event
- Performance information
- Troubleshooting information
Monitoring WebSphere Adapters with the CEI server
For monitoring with the common event infrastructure (CEI) server, you can use the administrative console to manage the details for event types and to display recorded events in the CBE browser. This example shows how to use the console to change the level of detail recorded for some event types and to use the CBE browser to view the information for individual events.
You need to set the log and trace level at the admin console to monitor the CEI events.
- Open the administrative console.
- In the navigation pane, click Servers > Server Types > WebSphere application servers.
- Click server_name.
- Under Troubleshooting, click Logging and tracing.
- Click Change Log Detail levels.
- Select the Runtime tab.
- Expand the tree for WBIEventMonitor.CEI.ResourceAdapter.* and you will
see the event types as shown in Figure 5:
- For outbound:
- For inbound:
- For outbound:
- Click on each of the events and select Finest.
- Click OK.
Figure 5. Configuring the CEI monitoring
- Switch to the business rules sample application page, and run the
application once. Go back to the administrative console, and select
Integration Applications > Common Base Event
Browser from the navigation pane (see Figure 6).
Note: If you are running your server on the node within a Network Deployment environment, you may need to modify the Event Data Store field to include the names of your server and node. Enter the string in the following form:
- Then click Get Events.
Figure 6. CEI events details under the CBE browser
Monitoring by using ARM
Application Response Measurement (ARM) is an Open Group standard. Request metrics help you to plug in an ARM agent to collect response time measurements. WebSphere Application Server does not ship an ARM agent. However, it supports the use of agents adhering to ARM 4.0 and ARM 2.0 standards.
You can choose your own ARM implementation providers to obtain the ARM implementation libraries. Follow the instruction from the ARM provider, and ensure that the ARM API Java archive (JAR) files found in the ARM provider are on the class path so that WebSphere Application Server can load the needed classes.
The request metrics information is either saved to the log file for later retrieval and analysis, sent to the Application Response Measurement (ARM) agents, or both. Request metrics provide response time for each of the major WebSphere Application Server components through the ARM APIs. Figure 7 shows the request monitoring intervals, which collect the data and push the values to ARM.
Figure 7. ARM details
In the case of Tivoli Monitoring Transaction Performance V5.3, copy the
armjni.jar and core_util.jar files
from the Tivoli Monitoring Transaction Performance
<tmtp_install_root >/lib installation
root directory to the
directory, which is the WebSphere Application Server installation root
directory. If the underlying ARM implementation is ARM 4.0, you need to
specify the ARM transaction factory class name. Otherwise, this
specification is not required. To understand how the ARM monitors the
events, see Figure 8 for an example of the
time consumed by each scenario.
Figure 8. Time taken for a request at different levels
- The response time collected for each level includes the
following (see Figure 8):
- The time spent at that level, plus the time spent in the lower levels.
- The response time for the servlet, for example, 130 milliseconds.
- This includes the time spent in EJB and JDBC.
- Therefore, the servlet process itself contributes to 130-38=92ms.
- The output format from the ARM monitoring as seen in the logs of
WebSphere Application Server is shown below:
PmiRmArmWrapp I PMRM0003I: parent:ver=1,ip=188.8.131.52,time=1178926386699,pid=6060,reqid=4097,event=1 current:ver=1,ip=184.108.40.206,time=1178926386699,pid=6060,reqid=4097,event=1 type=URI detail=/TBWebProj/WebContent/Result.jsp elapsed=1625
In this article, you have seen the various approaches for monitoring events and how to configure them for an Adapter at the embedded or node level. The article also showed how to use the right framework for getting the required data.
- WebSphere Adapters product page
- WebSphere Adapters Information Center
- WebSphere Adapters product library
- IBM Redbook: WebSphere Business Integration Adapters
- WebSphere Adapters support page
- WebSphere Application Server Information Center: Monitoring in WebSphere Application Server
- Wikipedia: Definition of Application Response Measurement
Dig deeper into WebSphere on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.