Monitoring the WebSphere Adapter life cycle using the monitoring frameworks

WebSphere® Adapters provide bi-directional connectivity between business applications and Enterprise Information System through event notifications. This article describes monitoring adapters by leveraging the various monitoring frameworks available, such as PMI, CEI, and ARM. The article also explains how to use the right framework for getting the required data for an Adapter and to tune it accordingly.

Abhishek Rohira (arohira1@in.ibm.com), Software Engineer, IBM

Photo of Abhishek RohiraAbhishek Rohira is a Software Engineer working on the development and support of WebSphere Adapter at the IBM India Software Lab. He has more than 3 years of experience working with various Java technologies, including JCA. He has a Bachelor's degree in Computer Science and Engineering from the Vellore Institute of Technology, India.



Naga Srikanth Boddapati (nagasrikanth@in.ibm.com), Software Engineer, IBM

Photo of Naga BoddapatiNaga Srikanth Boddapati is a Staff Software Engineer working on the development and customer support of WebSphere Adapter at the IBM India Software Lab. He has more than 7 years of experience working with various Java technologies. He has worked on the development of the Performance Monitoring Infrastructure component of WebSphere Application Server. He gives many presentations at various venues and conducts workshops for customers.



12 September 2012

Introduction

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.

Prerequisites

You need:

  • 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
PMI service in WebSphere Application Server architecture
Figure 2. PMI metrics monitored in Websphere Application Server
PMI service in WebSphere Application Server architecture

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.

Procedure

  1. Open the administrative console.
  2. Click Server > Application Servers in the console navigation tree.
  3. Click a server.
  4. Click the Configuration tab.
  5. Click the Performance Monitoring Infrastructure (PMI) under Performance.
  6. Select the Enable Performance Monitoring Infrastructure (PMI) check box.
  7. Optionally, select the check box Use sequential counter updates to enable precise statistic updates.
  8. Optionally, choose a statistic set that needs to be monitored under Currently Monitored Statistic Set.
  9. 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.
  10. Click Apply or OK.
  11. Click Save.
  12. Restart the application server. The changes you make will not take effect until you restart the application server.
  13. 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
    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
    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.

Procedure

You need to set the log and trace level at the admin console to monitor the CEI events.

  1. Open the administrative console.
  2. In the navigation pane, click Servers > Server Types > WebSphere application servers.
  3. Click server_name.
  4. Under Troubleshooting, click Logging and tracing.
  5. Click Change Log Detail levels.
  6. Select the Runtime tab.
  7. Expand the tree for WBIEventMonitor.CEI.ResourceAdapter.* and you will see the event types as shown in Figure 5:
    • For outbound:
      • WBIEventMonitor.CEI.ResourceAdapter.Outbound.ENTRY=all:
      • WBIEventMonitor.CEI.ResourceAdapter.Outbound.EXIT=all:
      • WBIEventMonitor.CEI.ResourceAdapter.Outbound.FAILURE=all:
    • For inbound:
      • WBIEventMonitor.CEI.ResourceAdapter.InboundEventRetrieval.ENTRY=all:
      • WBIEventMonitor.CEI.ResourceAdapter.InboundEventRetrieval.EXIT=all:
      • WBIEventMonitor.CEI.ResourceAdapter.InboundEventRetrieval.FAILURE=all:
  8. Click on each of the events and select Finest.
  9. Click OK.
    Figure 5. Configuring the CEI monitoring
    Configuring the CEI monitoring
  10. 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:

    cell/nodes/node_name/servers/server_name/ejb/com/ibm/events/access/EventAccess
  11. Then click Get Events.
    Figure 6. CEI events details under the CBE browser
    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
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 app_server_root/lib 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
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=9.26.237.77,time=1178926386699,pid=6060,reqid=4097,event=1      
    current:ver=1,ip=9.26.237.77,time=1178926386699,pid=6060,reqid=4097,event=1
    type=URI detail=/TBWebProj/WebContent/Result.jsp elapsed=1625

Conclusion

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.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into WebSphere on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere, Business process management
ArticleID=834443
ArticleTitle=Monitoring the WebSphere Adapter life cycle using the monitoring frameworks
publish-date=09122012