System Monitoring in Oracle Enterprise Manager Grid Control 10g Release 2

This tutorial describes how to use Oracle Enterprise Manager Grid Control 10g Release 2 to create Monitoring Templates, User Defined Metrics and Metric Baselines.

Approximately 1 hour

Topics

This tutorial covers the following topics:

Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: Because this action loads all screenshots simultaneously, response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.

The screenshots will not reflect the specific environment you are using. They are provided to give you an idea of where to locate specific functionality in the Oracle Enterprise Manager 10g Grid Control console.

Note: This OBE is best-viewed using Internet Explorer version 5.5 or later.

Overview

With the ever-increasing size and complexity of the enterprise environment, it has become imperative for IT professionals to maintain a high level of availability and performance of the applications and components that make up the application's technology stack. The performance of these application and components has to be monitored constantly. In addition to this, any problem occurring in any of the applications has to be fixed before it affects the business operations. Oracle Enterprise Manager provides a comprehensive, flexible, and easy-to-use monitoring functionality. It detects IT problems on time and notifies the administrator of the impending risks. Thus, it stabilizes the functioning of your enterprise.

In this tutorial, you see a step-by-step procedure to create a Monitoring Template using the out-of-box monitoring settings for your test environment. You also learn to create User Defined Metrics and set up Metric Baselines.

Back to Topic List

 

Scenario

Linda is a manager in charge of a team of DBAs and system administrators who maintain the system environment. Like many organizations, Linda maintains different environments to support development, testing, and production. Linda would like to set up different monitoring levels for each of these environments. Using Enterprise Manager's customizable monitoring features, Linda is able to use out-of-box monitoring settings for her development environment, and set up custom thresholds for a standard set of metrics for her testing and production environments. Linda can also leverage her existing scripts, or user-defined metrics, to monitor.

Back to Topic List

Creating the Monitoring Template

Monitoring Templates enable you to simplify the task of standardizing monitoring settings across your enterprise. You can specify the monitoring and policy settings once and use them as often as required. Like many organizations, you may want to maintain different monitoring settings for different environments. For example, you may have a test environment and a development environment. Monitoring templates make it easy for you to apply a specific monitoring setting for a specific class of targets. You can use the out-of-box monitoring settings for your target and also customize the thresholds for a standard set of metrics for your enterprise environment. Monitoring Templates define all the Enterprise Manager parameters that you would normally set to monitor a target, such as the target type to which the template applies, thresholds, metrics (including user-defined metrics), metric collection schedules, and corrective actions.

Perform the following steps to create a Monitoring Template for a database:

1.

Open a browser and enter the URL to access the server on which you installed the management service, in the following format:

http://<management service hostname>.<domain>:<port>/em/

The default port value on a machine with no other database instances installed on it is 7777. However, if there are other instances running on the machine, then the port may be different.

The Login page will be displayed. Enter the User Name and Password, and then click the Login button.

 

2.

To create a Monitoring Template, from the Grid Control home page, click Setup. Setup enables you to access general Enterprise Manager configuration and system monitoring functions. On this page, you can also create an administrator and roles. You can also create groups, systems, and services to logically organize your targets for effective management.

 

3.

Click the Monitoring Templates link in the left navigation pane.

 

4.

Click the Create button.

 

5.

Click the flashlight icon to select the target for which you want to create the Monitoring Template.

 

6.

The Search and Select: Targets window is displayed. By default, in the Target Type drop-down list, the All option is selected. Change it to Database Instance. Choose the database for which you want to create a Monitoring Template and then click the Select button. This brings you back to the main page.

 

7.

You can now see the database that you selected in the Target text field. Click the Continue button.

 

8.

On the Create Monitoring Template page, specify a name for the template. You can specify the purpose of the Monitoring Template in the Description text field.

 

9.

Click the Metric Thresholds subtab.

 

10.

By default, the Metric Threshold page is populated with metrics associated with the selected target. Thresholds are boundary values against which monitored metric values are compared. You can specify a warning threshold such that when a monitored metric value crosses that threshold, a warning alert is generated. This alert in turn notifies you about impending problems, which you can address in a timely manner. Here, you can specify the Critical Threshold value for the Database Time Spent Waiting (%). For example, if, under the Database Time Spent Waiting (%), the Critical Threshold for the Application value exceeds 40, a critical alert is triggered to notify you that immediate attention is needed. If a critical alert is ignored, the system may shut down or crash.

 

11.

You can also remove metrics on this page. For example, the Missing Media File Count metric represents the count of missing media files. This is a database-level metric. For cluster databases, this metric is monitored at the cluster database target level and not by member instances.

For this Monitoring Template, you want only a few of the metrics monitored for your database. So you would want to remove the excess metrics. Select the Missing Media File Count option to remove.

 

12.

Click the Remove Metrics from Template button.

 

13.

Click OK.

 

14.

You have successfully created the Monitoring Template.

 

15.

When a template is applied, future changes made to the template will not be automatically propagated to the targets: You must reapply the template to all affected targets. To reapply the template, you must have at least OPERATOR target privileges on the destination targets. To apply, select the template that you created and then click Apply.

 

16.

A Monitoring Template is specified for a particular target type and can be applied to targets of the same type only. Because your target type for this template is Database Instance, you can apply this template to other database instances as required. To add this Monitoring Template to other targets, click the Add button.

 

17.

The Search and Select: Targets window is displayed. Because your target type for this template is Database Instance, you see this option selected in the Target Type drop-down list. Here, choose the database instances Finance and HR, and then click the Select button.

 

18.

On the Apply Monitoring Template page, select the Database Instance targets to which this Monitoring Template will be applied and then click OK.

 

19.

You can see the submission confirmation of the Monitoring Template. It may take a few minutes for the template to be applied on all the targets.

Back to Topic List

 

Creating the User-Defined Metrics

Metrics are units of measurement used to determine the health of a target. It is through the use of metrics and associated thresholds that Enterprise Manager sends out alerts to notify you about problems with the target. A User Defined Metric or UDM allows you to execute your own scripts. You may want to create a user-defined metric because, as a DBA, you may have many scripts that you use. You may have to use some new scripts that are not already monitored by Grid Control. So by using that script logic in a UDM, you can incorporate a custom script into Enterprise Manager's framework and have it run as any other metric.

The data returned by these scripts can be compared against thresholds and generate severity alerts similar to alerts in predefined metrics. There are two types of user-defined metrics: Operating System and SQL.

Operating System (OS) User-Defined Metrics: Accessed from the Host target home pages, these user-defined metrics allow you to implement custom monitoring functions via OS scripts.

SQL User-Defined Metrics: Accessed from the Database target home pages, these user-defined metrics allow you to implement custom database monitoring using SQL queries or function calls. It does not use external scripts: you enter SQL directly into the Enterprise Manager console at the time of metric creation.

Here, you learn to create User-Defined SQL Metric. Perform the following steps to create a User-Defined Metric.

1.

Log in to Enterprise Manager and click the Targets tab.

 

2.

To create a User-Defined Metric, click the Databases tab.

 

3.

Select the Finance Database Instance.

 

4.

You can use the Database Home page to:
Determine the current status of the database by viewing several types of metrics
Start or stop the database
Black out selected targets
Access the performance, administration, and maintenance of the database environment via three tabs with each page displaying subsections

 

5.

Scroll down the Home page of the Finance Database Instance. Under Related Links, click the User-Defined Metrics link.

 

6.

Click the Create button to create a User-Defined SQL Metric.

 

7.

 

On the Create User-Defined Metric page, define the operational and environmental parameters required to run your script. First, specify a name for the User-Defined Metric. Then, choose Number in the Metric Type as your script returns numeric values. In the SQL Query Output, choose Two Columns. (It is used for a query that returns two columns. Each value of the first column must be a unique value and the second column must be of the selected Metric Type.) In the SQL Query text field, enter the SQL query.

 

8.

Scroll down the page to the Database Credentials. Enter the username and password. Scroll down further to the thresholds. This is an optional argument. If you want the values returned by the SQL query or function call compared with a set of threshold values, enter the requisite threshold information. Here, choose the ">" operator from the Comparison Operator drop-down list. Specify the Warning Threshold as 1800 and the Critical Threshold as 2000.

 

9.

For SQL queries that return multiple rows (two columns), you can specify the Warning Thresholds by Key value. Enter a key-based warning threshold value in this text field. These values are compared against the values returned by the query using the specified comparison operator. It overrides the value specified in the Warning text field.

Similarly, in Critical Thresholds by Key, enter key-based critical threshold values against which returned values are compared using the specified comparison operator. It overrides the value specified in the Critical text field.

 

10.

Specify an Alert Message.

 

11.

Under the Schedule section, specify the start time and frequency at which the SQL query or function call should be made. Under the Start section, "Immediately after creation" is selected by default. In the frequency section, from the "Repeat every" drop-down list, 15 minutes is selected by default.

 

12.

Click Test to verify your metric definition. If any problems are found, Enterprise Manager displays a list of the field names where problems have been detected, and associated error messages next to each entry.

 

13.

You can see the test has succeeded. Click OK.

 

14.

You have successfully created the User-Defined Metrics.

 

Back to Topic List

 

Setting the Metric Baseline

A baseline is a named period of time associated with a target and used as reference for evaluating normal target performance patterns. Statistics are computed over the baseline period for specific target metrics to allow Enterprise Manager to understand what constitutes normal, expected variations in the metric versus variations that may be abnormal and that should generate an alert. Without using baselines, expected variations such as a normal peak in load during business hours might generate unwanted alerts. You can use these statistics to automatically set metric thresholds for alerting, as well as for normalizing graphical displays of system performance to highlight abnormal behavior.

Perform the following steps to set a baseline metric for a database:

1.

Log in to Enterprise Manager and click the Targets tab.

 

2.

To create a User-Defined Metric, click the Databases subtab.

 

3.

Choose the database instance for which you created the User-Defined Metric.

 

4.

Scroll down to select the Metric Baselines link under the Related Links section.

 

5.

You can use the Metric Baselines page to set the active baseline. The active baseline is responsible for establishing adaptive threshold values for comparison with current or future metric observations. There can be only one active baseline for a target.
The moving window baseline is the period of time bounded by midnight of the current day and n days before that time—that is, it excludes all metric observations of the current day, but includes all observations from the previous n days, where the user selects n. By using the information provided by the moving window baseline at regular intervals, you can adapt to the changing metric pattern in the system.
Static baselines are defined using a single fixed time period with specific beginning and ending dates. They are required to be at least seven days in duration. Static baseline periods are useful for establishing baselines over user-defined periods of special processing, such as month.

 

6.

Click the Baseline Normalized Metrics link under the Related Links section. Using Baseline Normalized Metrics, you can configure the baseline in such a manner that it measures the peak time and the low time and triggers the alert appropriately.

 

7.

The Baseline Normalized Metrics page shows the active baseline, which could be a moving window baseline or a static baseline. You can use this page to:
View statistically significant events
Select a real-time or historical view
Modify the display by selecting a noise reduction value
Access the Configure Normalization Metrics page

 

8.

Click the Metrics Baselines link on the upper portion of the page to come back to the Metric Baselines page.

 

9.

To create a Metric Baseline, select the Moving window baseline option and, from the drop-down list, select a time frame. From the Time Group drop-down list, select the By Day of Week option.

 

10.

Click the Apply button.

 

11.

You can see that the baseline is set.

 

Back to Topic List

 

In this lesson, you learned how to:

Create the Monitoring Template
Create the User-defined Metrics
Set the Metric Baseline

Back to Topic List

Place the cursor over this icon to hide all screenshots.