Thursday, December 17, 2009

Application Server Management


This article describes how you can use Enterprise Manager to manage the crucial components of your middle-tier Oracle Application Servers, which provide you with a platform for deploying your e-business Web applications.

Specifically, this chapter describes how Enterprise Manager can help you manage all aspects of your application server installations.

The Oracle Application Server management capabilities of Enterprise Manager are described in the following sections:
·         Complete Administration

Out-of-Box Management Using Application Server Control

Each Oracle Application Server 10g instance is installed with Application Server Control to manage that instance. Application Server Control provides Web-based management tools designed to monitor and administer application server instances, farms, and clusters. You can also deploy applications, monitor real-time performance, manage security, and configure the application server components.
Application Server Control relies on various underlying technologies to discover, monitor, and administer the environment.

Application Server Control consists of the Application Server Control console and its underlying technologies:
·         Oracle Dynamic Monitoring Service (DMS)
·         Oracle Process Management Notification (OPMN)
·         Distributed Configuration Management (DCM)
·         A local version of the Oracle Management Agent specifically designed to gather monitoring data.

For additional management functionality (for example, application service level management, deployments, historical data collections for performance trending alerts, and so on), you can use Enterprise Manager Grid Control.

Centralized Management Using Grid Control

While Application Server Control provides standalone management for one application server and its components, you can centrally manage all your application servers through a single window using Enterprise Manager Grid Control (Grid Control).

For example, if you have ten application servers installed on ten different hosts, you can use Grid Control to manage all these ten application servers. With the help of Management Agents deployed on each host, Grid Control automatically discovers the application servers on these hosts and begins monitoring them using default monitoring levels, notification rules, and so on.

Both Application Server Control and Grid Control have their own application server home pages that provide easy access to key information required by the administrators. The Application Server Home page on Grid
Control provides:
·         Application server status, responsiveness, and performance data
·         Resource usage for the application server and its components
·         List of core components that were installed and configured for the application server, and links to their home pages
·         Functionality to start, stop, and restart any of those core components
·         Alerts and diagnostic drill-downs so you can identify and resolve problems quickly
·         Links to Application Server Control for administration operations such as starting and stopping components, modifying configurations, and deploying applications
·         Links to other pages in Grid Control that might be helpful in accomplishing your given task

Automated Monitoring and Alerts

Enterprise Manager provides a comprehensive set of features that facilitates automated monitoring and generation of alerts. The Oracle Management Agent on a host automatically discovers the Oracle Application Server targets on that host, and helps Enterprise Manager perform unattended monitoring of their status, health, and performance.

Enterprise Manager gathers and evaluates diagnostic information from these targets distributed across the enterprise, and an extensive array of application server performance metrics are automatically monitored against predefined thresholds.

For example, Enterprise Manager can automatically monitor:
·         The CPU or memory consumption of the application server, including detailed monitoring of individual Java Virtual Machines (JVMs) being run by the server's Oracle Application Server Containers for J2EE (OC4J) instances.
·         J2EE application responsiveness from the application down through individual servlets and Enterprise JavaBeans (EJBs).
·         HTTP Server session volumes, connection duration, and error rates.
·         Oracle Application Server Web Cache hit rates and volumes.
·         Top servlets based on number of requests, maximum processing time, and highest average processing time.

If an Oracle Application Server or any of its core components go down, or if a performance metric crosses a warning or critical threshold, an alert is generated by Enterprise Manager and a notification is sent to you. Enterprise Manager supports notifications via e-mail (including e-mail-to-page systems), SNMP traps, and/or by running custom scripts.

When you receive an alert notification, Enterprise Manager makes it easy for you to investigate the problem and take corrective actions wherever required. For example, notification of excessive CPU consumption by OC4J may lead to investigation of the applications running in that container. By using the Top J2EE Applications tab of the Application Server Home page in Grid Control, you can quickly identify the highest volume or least responsive application. You can then drill down and diagnose application's servlets, Java Server Pages (JSPs), or EJBs to identify the bottleneck.

You can set up corrective actions to automatically resolve an alert condition. These corrective actions ensure that routine responses to alerts are automatically executed, thereby saving you time and ensuring that problems are dealt with before they noticeably impact the users.

You can also use monitoring templates to simplify the task of standardizing monitoring settings across your enterprise. You can specify the monitoring settings once and apply them to all Oracle Application Server targets. A Monitoring template defines all Enterprise Manager parameters you would normally set to monitor an Oracle Application Server target, such as:
·         Target type to which the template applies.
·         Metrics (including user-defined metrics), thresholds, metric collection schedules, and corrective actions.

When a change is made to a template, you can reapply the template across affected Oracle Application Server targets in order to propagate the new changes. You can reapply monitoring templates as often as needed.

Diagnostics and Historical Analysis

The following sections describe important management tasks, such as:

Diagnosing Performance Issues with Top Reports

When you are troubleshooting performance problems, it can be helpful to know which servlets or JSPs are the most active. By using the Top Servlets or Top JSPs performance links of the Application Server Performance page Grid Control, you can identify the top Java servlets or JSPs running on the application server instance. You can then sort them to identify the servlets and JSPs by number of requests, maximum processing time, or highest average processing time.

Analyzing Historical Performance

As with all Enterprise Manager diagnostics, the application server diagnostic reports can be based on current or historical data. Application server metrics are collected and stored in the Management Repository, so you can analyze the data well after the situation has changed. For example, you can use historical data and diagnostic reports to research an application performance problem that occurred days or even weeks ago.

You can even provide a customized time period for which the data should be retrieved from the Management Repository. You can customize the time period for:
·         Pre-defined range of the last 24 hours, last 7 days, or last 31 days
·         Customized range of any number of days, weeks, months, or years
·         Any start date and end date (such that the duration is not greater than 99 years)

Monitoring Application Server Farms and Clusters

Enterprise Manager provides a complete set of features for managing Oracle Application Server Farms (OracleAS Farm) and Oracle Application Server Clusters (OracleAS Cluster).An OracleAS Farm is a collection of OracleAS Clusters and application server instances that share the same Farm Repository.An OracleAS Cluster is a collection of application server instances with identical configuration and application deployment characteristics.

Using Grid Control, you can add OracleAS Farms, OracleAS Clusters and their members to Enterprise Manager for monitoring and centrally managing a set of application server instances and clusters.
Grid Control provides home pages for OracleAS Farms and OracleAS Clusters that help you monitor their overall health. The home pages provide information about the status and availability of all their targets, generated alerts, policy violations, configuration changes, and so forth.

Enterprise Manager also helps you study the High Availability grouping done for the members of an OracleAS Cluster. A High Availability Group is a group composed of similar individual components of application server instances clustered together in a DCM managed cluster. For example, an OC4J High Availability Group has a group of OC4J instances in an OracleAS Cluster.

You can also access the Oracle System Monitoring Dashboard and view the health of OracleAS Farms, OracleAS Clusters, OC4J High Availability Groups, and HTTP Server High Availability Groups. Oracle System Monitoring Dashboard presents information using intuitive icons and graphics that let you spot recent changes and quickly identify and respond to problems. You can customize the display attributes to match information requirements of managed targets, monitor status indicators for recent problems, and see new alerts that have been triggered since the dashboard was last viewed.

Along with managing OracleAS Farms, OracleAS Clusters, and High Availability Groups as targets, Enterprise Manager provides comparative statistics at each level for workload distribution and performance analysis. For example, the Metrics pages for OracleAS Farms, OracleAS Clusters, and HA Groups provide key aggregated metrics from all components in graphical form for performance analysis and component correlation. You can click any of these metric charts to drill down and see more detailed information.
Although Enterprise Manager provides some pre-defined metrics for all of these targets, the Metrics pages are completely customizable to the requirements of a particular deployment. You can include other metrics of your choice, remove existing metrics, or adjust the layout of the metrics as needed.

In addition to monitoring the health of your OracleAS Farms and OracleAS Clusters, you can also monitor the J2EE applications deployed and running across all OC4Js for the application server instances.

You can monitor the members of your OracleAS Farms and Clusters, and take administrative actions like starting, stopping, or restarting each of those members. You can perform administrative operations such as:
·         Scheduling jobs to automate commonly-run tasks.
·         Creating blackouts to perform scheduled maintenance on the targets.
·         Viewing all the installations of the selected target types in your enterprise configuration. For example, you can view all the application server installations, all the database installations, and so on.
·         Accessing a list of predefined search queries to search and retrieve information for the targets. For example, you can search all data sources for OC4Js, all deployed applications for OC4Js, all J2EE modules for OC4Js, and so on.

Using Grid Control, you can also view the topology for OracleAS Farms and OracleAS Clusters, the details of which are given in the following section.

Viewing Application Server Topology

Besides monitoring the performance of application servers, OracleAS Farms, and OracleAS Clusters, you can also view their topology to understand what application servers and components are running on which hosts, how these components are related to each other, and how requests are routed through different layers of the deployment. This kind of visualization of the data center enterprise topology helps administrators effectively monitor, manage, and validate the enterprise architecture.

Grid Control provides three different views of topology. Each view provides the overlay of some key metrics of components including current status, number of alerts and policy violations, and CPU/memory utilization performance metrics.
·         Host View shows the physical view of deployment and visually shows the relationship between hosts and various components and instances hosted by them.
·         Routing Overview shows the routing view of topology and provides an end-to-end view of wired component and application flow through them. The routing includes routing from OracleAS Web Cache to Oracle HTTP Server to OC4J to DB instances.
·         Routing Details also shows the protocol and port used by various components to route requests to other components in the topology.

These routing views enable you to fix various topology configuration problems immediately. For example, if an OC4J instance is not accepting any user requests, the routing details view confirms if the front-ending Oracle HTTP Server instances are configured correctly to route user requests to that OC4J instance. OracleAS Web Caches, Oracle HTTP Server or OC4J components are displayed in the same box, if they provide redundancy for each other. For example, a set of OracleAS Web Caches are combined in the same box if all of them are routing to the same set of Oracle HTTP Server instances. Similarly, a set of OC4J instances are combined in the same box if they are routed by the same set of Oracle HTTP Server instances, and are also hosting the same set of J2EE applications. As the like-components are grouped together, the topology visual representation in routing overview or routing details view provides instant Root Cause Analysis for the service availability problems.

Complete Administration

Enterprise Manager provides a full set of features for performing Application Server administration, with Web-based interfaces for performing operations such as:
·         Starting, stopping, or restarting any of the core components of the application server.
·         Performing configuration management tasks, such as viewing and comparing configuration information. Refer to "Managing Configurations" in this chapter for more information.
·         Accessing a list of predefined search queries to search and retrieve configuration information. Refer to "Managing Configurations" in this chapter for more information.
·         Integrating application instrumentation in Enterprise Manager's event monitoring infrastructure. Refer to "Extensible Monitoring" in this chapter for more information.
·         Staging or applying an interim patch or patch set, and/or cloning an application server's Oracle home to one or more hosts. Refer to "Cloning and Patching the Application Server Environment" in this chapter for more information.
·         Performing scheduled backup and recovery. Refer to "Backup and Recovery of the Application Server Environment" in this chapter for more information.
·         Creating blackouts to perform scheduled maintenance.
·         Viewing the number of scheduled, running, suspended, and problem (stopped/failed) executions for all Enterprise Manager jobs submitted on the application server.
·         Creating Application Server Farms and managing their components.

The following sections describe some of the administrative functions that can be performed.

Managing Configurations

Enterprise Manager provides a suite of configuration management functions that can be performed on Oracle Application Server and its components (OracleAS Web Cache, Oracle HTTP Server, and OC4J).
The Oracle Management Agent collects configuration information about Oracle Application Server targets from their respective configuration files, and communicates this information over HTTP/HTTPS to the Oracle Management Service, which stores it in the Management Repository. This information is periodically collected and updated while maintaining the audit of changes. Enterprise Manager's configuration management capabilities efficiently guide the users to desired configuration data in a particular component.


In addition to collecting and tracking hardware and software installations (binaries version number/patch level) of Oracle Application Server targets, Enterprise Manager also tracks configuration details of core components (OracleAS Web Cache, Oracle HTTP Server, and OC4J) of all Oracle Application Server instances. You can compare these configuration details and view the differences and similarities between the core components. You have the flexibility to compare two configurations in the Management Repository or two saved configuration files. You can also compare one configuration with multiple configurations or one configuration in the Management Repository with a saved configuration file.

Using Grid Control, you can search configurations across application servers and find configuration anomalies - whether they are a mismatch of an install/patch version of Oracle Application Server software, or they are a mismatch of software configuration data for the core components of Oracle Application Server. You can perform more intelligent searches to identify all the components hosting a particular application or other resources.

You can also perform some out-of-box searches. The Administration page in Grid Control provided for Oracle Application Server targets allows you to search one or more:
·         Origin servers.
·         Application servers with particular installation settings.
·         Data sources used by the applications deployed across your enterprise configuration.
·         J2EE applications deployed in a particular OC4J instance, application server instance, or host.
·         Modules of J2EE applications deployed across your enterprise configuration.
·         Application server ports across your enterprise topology.

Extensible Monitoring

Many administrators often require custom logic to be written to check for conditions specific to their application environments. Enterprise Manager allows integration of application instrumentation in Enterprise Manager's event monitoring infrastructure. If application developers expose application instrumentation using standards like JMX or Web Services operations, then you can build management plug-ins for the instrumentation using easy-to-use command line tools, and leverage Enterprise Manager's event monitoring system to monitor it. You do not have to edit any XM files or write any integration code to integrate such instrumentation in Enterprise Manager. Simply follow these procedures to integrate application defined instrumentation in Enterprise Manager:
·         Use Command Line Interfaces that analyze MBean interfaces for JMX and WSDL for Web Services and create management plug-ins.
·         Import Management Plug-in Archive in Enterprise Manager.
·         Deploy Management Plug-in to Management Agents.
·         Create Target-type instances for the target types defined in Management Plug-in Archive.
·         Leverage Enterprise Manager's event monitoring system including monitoring templates, corrective actions, historical and real time metric views, alerts, customization of notification rules, and methods on events generated from application instrumentation metrics.

Cloning and Patching the Application Server Environment

Using Enterprise Manager's automated provisioning tools, you can ensure standardization in your data center and also significantly reduce the time spent on these tasks. To consistently maintain standardization in the topology, it is recommended that the new instances be added through ÒcloningÓ rather than Òinstall and configureÓ.

Cloning ensures that the new instance is installed and configured exactly like other instances in the enterprise topology. Cloning is the process of copying an existing installation to a different location while preserving its configuration and deployments. Enterprise Manager's cloning wizard automates the duplication of application server installations; specifically, the directories where the Oracle homes reside. Its "multicasting" capability also helps you create multiple clones on multiple target hosts in a single operation.

Using a direct link to Oracle MetaLink, Enterprise Manager proactively and regularly retrieves the list of critical patches that have to be applied on Oracle Application Server installations. Enterprise Manager also analyzes the data center environment and notifies you of patches that are applicable to their application server instances. All other patches can also be manually found in the context of a specific target. You can also automate the application of patches using robust job system infrastructure. You can apply the patches instantly or schedule the application in the maintenance window while backing out Oracle Application Server instances in the maintenance window.


Backup and Recovery of the Application Server Environment

Backup and recovery refers to the various strategies and procedures involved in guarding against hardware failures and data loss, and reconstructing data should there be a loss. A comprehensive backup strategy should involve a coordinated approach to backing up your entire application server environment, including the middle tiers and the Application Server Infrastructure Oracle homes.

Enterprise Manager helps you manage the backup and recovery of a single application server or a group of application servers.

Using Grid Control, you can:
·         Schedule backups.
·         Restore application server backups for recovery.
·         Display the status of backup jobs.
·         Display the status of recovery jobs.
·         Configure the required settings for backup.

No comments:

Post a Comment