Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Managing the WebLogic Platform with HP OpenView

The IT operations perspective

In our earlier article (WLDJ, Vol. 3, issue 5), we discussed the importance of designing for manageability. Using a case study of an on-line shopping application, DizzyWorld, we showed the developer's perspective around application manageability. This included both the development of a JMX MBean and the instrumentation of a Java Page Flow on the BEA WebLogic Platform.

In this article, we look at manageability from the operator's perspective. We will show how management metrics can be defined and mapped to JMX MBeans, and how those metrics can be collected and monitored with HP OpenView. The end goal is to better illustrate how manageability can be designed into your application, and how this data can then be leveraged in building a truly adaptive IT environment. We will begin with background on how the HP OpenView architecture supports the management of the BEA WebLogic platform.

Let's go through a quick introduction of HP OpenView, which consists of a suite of management products. For this example, we will use HP OpenView Operations (OVO) and the Smart Plug-in (SPI) for the BEA WebLogic Server. IT operators can use OVO and various SPIs to manage the entire IT infrastructure. This includes managing clusters of J2EE servers, databases, operating systems and other IT resources. In some cases OVO allows the capability of correlating management data between all of these systems and components. In this scenario, we will leverage OVO in combination with the SPI to provide a management solution that allows an operator to proactively monitor and manage the DizzyWorld application running on the WebLogic platform.

There are three basic components in the OVO architecture: agents, a management server, and display stations (see Figure 1). The agents are responsible for interacting with each managed resource. A management server consists of several managers to proactively send and display messages based on events captured by the agents. The display stations then provide a single view into the managed environment.

OVO monitors, controls, and reports on the health of the IT environment by using different management technologies, including SNMP, ARM, WBEM, CIM, and JMX. OVO and the WebLogic SPI leverage managed resources that are exposed with JMX on the WebLogic Platform. Operators can manage and monitor any WebLogic instance in addition to any JMX-enabled application running on those servers. While performing diagnostics, operators can start and stop WebLogic or turn on tracing and monitoring for a particular WebLogic Server instance. In addition, they can easily discover a newly deployed WebLogic instance running on machines in the network and add it to their management view. This can save valuable time for the network or system administrator.

In addition, the SPI provides access to over 50 different predefined metrics that can be used for management purposes. Developers can use these metrics to get information such as average execution time for a servlet, the number of times per minute that EJB beans were not available from the free pool, or the percentage of the JMS queue that has been filled. These metrics are defined through the JMX MBeans provided by the WebLogic platform.

Operators use these metrics to create reports and graphs or to monitor certain aspects of the WebLogic platform. These monitoring capabilities are based on the concept of OVO policies. The settings within these policies define various conditions and thresholds to monitor within the WebLogic Server. Once in use, the WebLogic SPI policies allow information to be sent back to the OpenView Operations management server to help operators proactively address application problems and avoid serious disruptions to their business.

As Figure 2 shows, the WebLogic SPI performs a number of steps to collect the JMX data for each metric:

  1. The OVO Monitor Agent starts based on the scheduling policies defined in OVO.
  2. The JMX collector:
    - Accesses a User-defined Metrics (UDM) file that contains references to JMX objects and attributes,
    - Communicates with the MBean Server running within the WebLogic platform and retrieves the data,
    - Performs any calculations and submits the values to the OVO Monitor Agent, where they are compared against defined thresholds.
  3. Based on the comparison results, an alarm message may be sent to the OVO console, or an e-mail or other type of notification can be sent to the person responsible for monitoring the application.

In the following sections, we'll take an in-depth look at defining the UDM, collector, and threshold policies in order to manage a JMX managed resource for our DizzyWorld application. Let's begin by taking a closer look at the Metric Definition file, which is key to accessing JMX data from the WebLogic platform.

Configuring a User-Defined Metric in OpenView
In our previous article, we developed a custom MBean for tracking the state of a shopping cart process and we want to use OVO to monitor it. Assuming this MBean has already been registered with the JMX Server, we will need to define this metric within OVO. The metric can then be used in OVO to generate alarms, create graphs, etc.

The first step is to create a UDM file. The UDM is an XML configuration file that defines what custom JMX MBeans will be collected by OVO. Multiple metrics can be defined in a single UDM file, and each metric can be either a reference to an MBean attribute or a calculated metric that combines other metrics together. Our DizzyWorld application has defined a very simple JMX MBean (see Figure 3).

This MBean defines two attributes, CartsCreatedCount and CartsCompletedCount, which refer to the total number of shopping carts that have been created and completed. We first want to define the mapping of each of these attributes within the UDM file. Listing 1 outlines the specific entry that can be added in the UDM file to retrieve the CartsCreatedCount.

This metric is given the name ShoppingCart_Completed. The FromVersion element within the MBean mapping indicates what versions of WebLogic are supported by this metric. The JMX object and attribute name are specified via the <ObjectName> and <Attribute> elements. Note that the object name supports JMX pattern matching. We specify the pattern string, "*:",Name=MyShoppingCartManager" to locate the MBean for our shopping cart manager.

You can take these individual JMX attribute values and combine them to create more useful, coarse-grained metrics. To do this, you have to construct a calculated metric that references the individual MBean values. In our example, we created two metrics, ShoppingCart_Completed and ShoppingCart_Created. These correspond to the CartsCreatedCount and CartsCompletedCount JMX attribute values. Listing 2 shows how a calculated metric can then be defined in the UDM file, corresponding to the percentage of all shopping carts that have been abandoned by users.

In this example, we have given this metric an ID of "WLSSPI_0710", a naming convention used by the WebLogic Server SPI to collect metrics. Our metric will be referenced as "710" during the configuration of the alarms and thresholds in the next section.

Once we've thought about the specific metrics we want to expose in the UDM file, the next step is to actually create the file. While it can be written using any text or XML editor, we recommend using the OpenView JMX Metric Builder, a tool supplied by HP to aid in UDM construction. This Eclipse-based tool provides facilities to connect and browse the JMX server and build metrics using a forms-based editor. Using the tool's MBean Explorer, you can browse the available JMX MBeans that you wish to use in the UDM file. Figure 4 shows a snapshot of our JMX Server with the MyShoppingCartManager MBean and related attributes highlighted.

Finally, using the Metrics Forms View, you can construct both the MBean metrics and the calculated metrics. Figure 5 provides an example of how our calculated metric for the shopping cart metric can be created using the JMX Metric tool.

Configuring OpenView Operations
With the UDM file created, the next step is to set specific threshold values for sending alarms to OpenView, and then to set the frequency with which we wish to collect this metric.

First, we will configure the generation of alarms through threshold settings. For our example, we want to generate an alarm if the percentage of shopping carts closed is at or below 50%. We must create a monitor policy to set the threshold settings for the metric. As shown in Figure 6, we configured the threshold to be a minimum threshold since we are trying to determine when the rate is less than or equal to 50%. Next, we determined what action we want performed when the threshold value is crossed. We could have configured a number of actions when a threshold is crossed, including sending an alarm to OVO, running a command or script, or generating a report. This flexibility is useful if you are working towards becoming an adaptive enterprise in which management data can be used to adapt the infrastructure to meet business demand.

For this example, we configured a message to be sent to the OVO console. As you can see from the Outgoing Message dialog box in Figure 6, we can set the Severity to a number of levels, including Major, Minor, or Critical. This helps the operator determine the importance of the message. In addition, we added instructions to help the operator diagnose and take appropriate actions (see Figure 7). The instructions include possible causes for the error and solutions for resolving it. This level of detail is important when trying to diagnose the problem.

Figure 8 shows a summary of the threshold and actions information. OVO evaluates the metric and when the threshold limit of 50% is reached, the appropriate message is generated in OVO.

Once the threshold settings have been made, the final step is to determine how often we want OVO to collect this metric. We configured the collector to run every minute. Additionally, we customized the collector program to collect data for our ShoppingCart metric.

Let's now turn back to the DizzyWorld application and see how we can manage and monitor the application.

Managing and Monitoring the Application
Our scenario consists of customers using the DizzyWorld application to do online shopping. Each customer would create a shopping cart during their shopping experience. However, not all of these customers complete their shopping at the Web site. Line-of-business managers want to know when the percentage of "completed carts" out of the "created carts" is 50% or lower. We have already created a threshold setting for 50% and we have the OVO data collector running every minute checking the metric against this threshold.

Within OVO, service maps are available that provide a view of your managed environment. Figure 9 displays a service map for WebLogic. Notice that there is no graphical indication of any event that needs attention at the moment in the "Before" picture. At this point, we will assume that a user has completed one shopping experience, so the carts completed and carts created counts are both 1 in the JMX MBean. We will begin a shopping experience, but instead of completing the purchasing process, we will exit the Web site before completing the purchase. That will leave the counts at 1 cart completed and 2 carts created in the JMX MBean. This will automatically fire an OVO event that indicates too few carts are being completed and the service map in OVO will indicate a problem (as shown in the "After" picture in Figure 9).

Since our application has been instrumented with JMX, certain shopping events update the MBean attribute values each time a user proceeds to checkout or places an order. We have configured OVO to collect on a metric that performs a calculation of the completed shopping rate and checks it against a threshold setting. If the threshold is crossed, an alarm is automatically sent to the OVO console.

We can switch to the message view and see a message in OVO indicating the threshold level has been crossed (see Figure 10). This information is important to the line of business manager and helps him determine how his business is doing. He could correlate this information with WebLogic performance data to help him determine why so many shoppers are leaving the site without completing a purchase. In addition, he could select the "Instructions" tab to get further instructions on how to correct the problem.

Now that we have integrated the JMX metrics with OVO, an operator may want to show those results in a graph. Using OVO's Graph Configuration tool, the operator can configure and view a graph of the business metric. OVO gives an operator the option of displaying many types of graphs from the information that has been collected through the metrics. In this example, we chose a bar graph using our Shopping Cart metric (see Figure 11).

We configured and graphed information on the business metric to give ourselves a graphical view of the number of completed shopping carts, allowing us to display that information for a given period. The graph shows data for a fairly simple metric but operators can correlate the Shopping Carts business metric with JVM Memory Heap, Time of Day, or number of users on the Web site, and take proactive steps to improve response time for the customers using the site.

IT organizations are continually looking for opportunities to reduce costs and to improve operational efficiencies. It is clear that deployment and maintenance issues can be a big factor. In the past, developers have typically looked at management as the responsibility of IT Operations. There are clear benefits to designing and developing for manageability, ensuring that IT has the information they need to quickly analyze and respond to both operational and business needs.

In this article, we took a closer look at application manageability from the perspective of the IT operations staff. Specifically, we looked at J2EE manageability using JMX technology. This article showcased how HP OpenView Operations and the WebLogic SPI allow operators to manage the BEA WebLogic Platform more efficiently. With the SPI, IT operations can quickly view, analyze, and report on operational metrics such as EJB, Servlet, and JMS metrics.

There are situations where you may need to look at more than just the J2EE containers or platform components. To truly build an adaptive enterprise, where IT can better reflect the needs of the business, it's critical that operational and business data is available for monitoring and control. Gathering business metrics often requires the development of custom managed objects and artifacts.

We showed how JMX technology can be used to collect these business metrics. Then, using the user-defined metrics capability within OVO, we showed how these JMX objects could be collected from the BEA WebLogic platform. We further showed how to configure OVO policies to monitor these business metrics for certain threshold conditions.

Clearly, diagnosing applications for performance and SLA conformance requires a more end-to-end view of the environment. Management must take into account the client's perspective, all middleware platforms in deployment, as well as any back-end systems and databases. This analysis often requires a "single pane of glass" into the IT infrastructure, where IT operations and staff can correlate management data and perform root cause analysis.

To address these needs, HP provides a suite of Web application management products that support the BEA WebLogic platform (see Figure 12). From an end-user perspective, the HP OpenView Internet Services (OVIS) reports on the availability and response time of synthetic or real user transactions located as close to the user as possible. HP also offers OpenView Transaction Analyzer (OVTA) for tracing transactions from the client to the application server to backend databases. OVTA also provides a passive application monitoring capability, including application server response time and volume metrics. Combined with OVIS, this provides the user with a complete J2EE application server-level management solution.

Looking Ahead
Looking to the future, we see an increased use of Web services, service-oriented architectures, and grid-based networks. Use of these technologies further increases the demand for robust management software. But, management is not simply about reacting to problems in the systems and applications in development. Organizations need more adaptive management solutions where IT is better aligned with the business. One such solution offered by HP is Life Cycle Management for Web Services (LCM4WS). LCM4WS assists enterprises in better managing life-cycle issues such as deployment, versioning, and security of Web services.

There are a number of technical resources currently available to help get you started in application management and adaptive management. If you are a developer, the best place to start is HP's Dev Resource Central (devresource.hp.com). Here you will find a variety of technical papers, articles, software downloads, and forums focused around JMX and application manageability. If you want to learn more about HP OpenView and the products available for managing web applications, check out openview.hp.com/solutions/appm.


  • Peltz, Chris and Rogers, Claire. "Instrumenting a Java Page Flow using JMX Technology". BEA WebLogic Developer's Journal, Volume 4, issue 5.
  • More Stories By Chris Peltz

    Chris Peltz is a senior architect within HP's
    Developer Resources Organization (http://devresource.hp.com), providing technical and architectural consulting to enterprise customers in the areas of J2EE, Web services, and
    application management.

    More Stories By Claire Rogers

    Claire Rogers is a senior software consultant in HP's Developer Resources Organization, providing software consulting to customers on J2EE application management.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    @ThingsExpo Stories
    SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
    SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
    Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
    Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
    Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
    As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
    With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
    Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati...
    Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
    SYS-CON Events announced today that mruby Forum will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. mruby is the lightweight implementation of the Ruby language. We introduce mruby and the mruby IoT framework that enhances development productivity. For more information, visit http://forum.mruby.org/.
    Digital transformation is changing the face of business. The IDC predicts that enterprises will commit to a massive new scale of digital transformation, to stake out leadership positions in the "digital transformation economy." Accordingly, attendees at the upcoming Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA, Oct 31-Nov 2, will find fresh new content in a new track called Enterprise Cloud & Digital Transformation.
    SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
    In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha...
    SYS-CON Events announced today that Avere Systems, a leading provider of enterprise storage for the hybrid cloud, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Avere delivers a more modern architectural approach to storage that doesn't require the overprovisioning of storage capacity to achieve performance, overspending on expensive storage media for inactive data or the overbui...