Skip Headers

Oracle® Enterprise Manager Advanced Configuration
10g Release 1 (10.1)

Part Number B12013-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

9 Configuring Notifications

The notification system can, in addition to notifying administrators, automate responses to alerts by executing operating system commands (including scripts) and PL/SQL procedures. This capability allows you to implement specific IT practices in response to specific alerts. For example, if an alert is generated when monitoring the operational (up/down) status of a database, you may want the notification system to automatically open an in-house trouble-ticket using an OS script so that the appropriate IT staff can respond in a timely manner.

By using Simple Network Management Protocol (SNMP) traps, the Enterprise Manager notification system also allows you to access SNMP-enabled third-party applications such as HP OpenView. Some administrators may want to send third-party applications a notification when a certain metric has exceeded a threshold.

Specifically, this chapter contains the following sections:

9.1 Setting Up Notifications

Notifications are configured using Notification Methods and Notification Rules.

9.2 Managing Notification Methods

Notification Methods allow you to define different mechanisms for sending notifications. These include e-mail, SNMP traps, or running custom scripts, or all three. Once defined, these methods can then be used with Notification Rules for sending notifications to administrators as a result of alert occurrences.

Through the Notification Methods page, you can:

9.2.1 Setting Up a Mail Server for Notifications

Before Enterprise Manager can send e-mail notifications using Notification Rules, you must first set up the Outgoing Mail (SMTP) servers using the Notification Methods page (Figure 9-1). Display the Notification Methods page by clicking Setup on any page in the Grid Control and clicking Notification Methods in the vertical navigation bar. Only privileged users can configure SMTP servers.

Specify one or more outgoing mail (SMTP) server names, the name you want to appear as the sender of the notification messages, and the e-mail address you want to use to send your e-mail notifications. This address, called the Sender's Mail Address, must be a valid address on each mail server that you specify. This e-mail address will be notified by the mail server of any problem encountered during the sending of an e-mail notification. See Example 9-1.

Example 9-1 Mail Server Settings

Outgoing Mail (SMTP Server) smtp01.oracle.com, smtp02.oracle.com
Identify Sender As Enterprise Manager Notifications
Sender's Mail Address mgmt_rep@oracle.com

Figure 9-1 Defining a Mail Server

Shows Mail Server def fields on Notification Methods pg
Description of the illustration mail_server.gif


Note:

The e-mail address you specify on this page is not the e-mail address to which the notification is sent. You will have to specify the e-mail address (where notifications will be sent) from the Preferences General page. For information on specifying e-mail addresses for e-mail notification, see Specifying E-mail address for E-mail Notifications.

After configuring the e-mail server, click Test Mail Servers to verify your e-mail setup. You should verify that an e-mail message was received by the e-mail account specified in the Sender's E-mail Address field.

Defining multiple mail servers will improve the reliability of e-mail notification delivery and spread the load across multiple systems. The Management Service makes use of each mail server to send e-mails and the behavior is controlled by the following parameters found in the $ORACLE_HOME/sysman/config/emoms.properties file.

Example 9-2 Management Service Parameters

# The maximum number of emails that can be sent in a single connection to an
# email server
# em.notification.emails_per_connection=20
#
# The maximum number of emails that can be sent in a minute
# em.notification.emails_per_minute=250

Based on the defaults in Example 9-2, the first mail server is used to send 20 e-mails before the Management Service switches to the next mail server which is used to send another 20 e-mails before switching to the next mail server. This prevents one mail server from becoming overloaded and should improve overall reliability and throughput.

9.2.2 Custom Notification Methods using Scripts and SNMP Traps

You can create other custom notification methods based on OS scripts, PL/SQL procedures, or SNMP traps. Any administrator can then use these methods in Notification Rules.

9.2.2.1 Adding a Notification Method based on an OS Command

You can specify an Operating System command or script that will be called in Notification Rules. The OS Command is run as the user who started the Management Service. The OS command (or script) must exist and be placed on each Management Service host machine that connects to the Management Repository.


Note:

Notification methods based on OS commands must be configured by an administrator with superuser privileges before users can choose to select one or more of these OS command methods while creating/editing a notification rule.

The following information is required for each OS command notification method:

  • Name

  • Description

    Both Name and Description should be clear and intuitive so that the function of the method is clear to other administrators.

  • OS Command

You must enter the full path of the OS command or script in the OS command field (for example, /u1/bin/myscript.sh). For environments with multiple Management Services, the path must be exactly the same on each machine that has a Management Service. Command line parameters can be included after the full path (for example, /u1/bin/myscript.sh arg1 arg2).

To define a notification method based on an OS command, perform the following steps.

  1. Create an OS command on the repository host machine.

    Create an OS Command on each Management Service machine that connects to the Management Repository. The OS Command should be an absolute path name and must be the same on each Management Service host machine, for example, /u1/bin/logSeverity.sh. The command is run by the user who started the Management Service. If an error is encountered during the running of the OS Command, the Notification System can be instructed to retry the sending of the notification to the OS Command by returning an exit code of 100. The procedure is initially retried after one minute, then two minutes, then three minutes and so on, until the notification is a day old, at which point it will be purged.

    Example 9-3 shows the parameter in emoms.properties that controls how long the OS Command can execute without being killed by the Management Service. This is to prevent OS Commands from running for an inordinate length of time and blocking the delivery of other notifications. By default the command is allowed to run for 30 seconds before it is killed.

    Example 9-3 Parameter in emoms.properties File

    # The amount of time in seconds after which an OS Command started by the
    # Notification System will be killed if it has not exited
    # em.notification.os_cmd_timeout=30
    
    
  2. Add this OS command as a notification method that can be called in Notification Rules. See "Adding a Notification Method based on an OS Command" .

  3. Define a notification rule (choose the targets and conditions for which you want to be notified), and associate the OS command with the rule. See "Creating Your Own Notification Rules".

Example 9-4 shows an example of the required information.

Example 9-4 OS Command Notification Method

Name Trouble Ticketing
Description Notification method to log trouble ticket for a severity occurrence
OS Command /private/mozart/bin/logTicket.sh

Note:

There can be more than one OS Command configured per system.

Information about the metrics in alert can be made available to your OS notification method. See "Passing Metric Severity Information" for more details.

9.2.2.2 Adding a Notification Method Based on a PL/SQL Procedure

Before setting up the method, the procedure must be created on the repository database. Using the database account of the repository owner (such as SYSMAN).

The procedure must have the following signature:

PROCEDURE p(severity IN MGMT_NOTIFY_SEVERITY)


Note:

The notification method based on a PL/SQL procedure must be configured by an administrator with superuser privileges before a user can select it while creating/editing a notification rule.

Information about the metrics in alert can be made available to your PL/SQL procedure. See "Passing Metric Severity Information" for more details.

Next, create a notification method based on your PL/SQL procedure. The following information is required when defining the method:

  • Name

  • Description

  • PLSQL Procedure

You must enter a fully qualified procedure name (for example, OWNER.PKGNAME.PROCNAME) and ensure that the owner of the Management Repository has execute privilege on the procedure.

To define a notification method based on a PL/SQL procedure, perform the following steps.

  1. Create the PL/SQL procedure on the repository database using the following procedure specification:

    PROCEDURE p(severity IN MGMT_NOTIFY_SEVERITY)

    If an error is encountered during the running of the procedure, the Notification System can be instructed to retry the sending of the notification to the procedure by raising a user defined exception that uses the error code -20000. See the example above. The procedure initially retried after one minute, then two minutes, then three minutes and so on, until the notification is a day old, at which point it will be purged.

  2. Add this PLSQL procedure as a notification method that can be called in Notification Rules. See "Adding a Notification Method Based on a PL/SQL Procedure".

    Make sure to use a fully qualified name that includes the schema owner, package name and procedure name. The procedure will be executed by the repository owner and so the repository owner must have execute permission on the procedure.

  3. Associate the PL/SQL procedure with a notification rule.

An example of the required information is shown in Example 9-5.

Example 9-5 PL/SQL Procedure Required Information

Name Cleanup error log
Description Notification method to clean up the error log table
PLSQL Procedure mgmt_rep.log_util.cleanup_log

There can be more than one PL/SQL-based method configured per system.

For information about the severity types that relate to a target's availability, and how metric severity information is passed to the PLSQL procedure, see "Passing Metric Severity Information" for more details.

9.2.2.3 Adding a Notification Method Based on an SNMP Trap

Enterprise Manager supports integration with third-party management tools through the SNMP. For example, you can use SNMP to notify a third-party application that a selected metric has exceeded its threshold.

The trap is an SNMP Version 1 trap and is described by the MIB definition shown at the end of this chapter. See "Management Information Base (MIB)".

For more comprehensive configuration information, see the documentation specific to your platform; SNMP configuration differs from platform to platform.


Note:

Notification methods based on SNMP traps must be configured by an administrator with superuser privileges before any user can then choose to select one or more of these SNMP trap methods while creating/editing a notification rule.

You must provide the name of the host (machine) on which the SNMP master agent is running and other details as shown in the following example. In Example 9-6, the SNMP host will receive your SNMP traps.

Example 9-6 SNMP Trap Required Information

Name HP OpenView Console
Description Notification method to send trap to HP OpenView console
SNMP Trap Host Name machine1.us.oracle.com
SNMP Host Port 162
SNMP Community public
This SNMP host will receive your SNMP traps.

Note:

A Test Trap button exists for you to test your setup.

Metric severity information will be passed as a one-line message in the SNMP trap.

An example SNMP Trap is shown in Example 9-7. All information is in one line which is sent as a variable embedded in the SNMP Trap.

Example 9-7 SNMP Trap

Tue Oct 28 05:00:02 2003

Command: 4
   Enterprise: 1.3.6.1.4.1.111.15.2
   Agent: 138.1.6.200
   Generic Trap: 6
   Specific Trap: 1
   Time Stamp: 8464:39.99
   Count: 11

Name: 1.3.6.1.4.1.111.15.1.1.1.2.1
   Kind: OctetString
   Value: "mydatabase"

Name: 1.3.6.1.4.1.111.15.1.1.1.3.1
   Kind: OctetString
   Value: "Database"

Name: 1.3.6.1.4.1.111.15.1.1.1.4.1
  Kind: OctetString
  Value: "myhost.com"

Name: 1.3.6.1.4.1.111.15.1.1.1.5.1
   Kind: OctetString
   Value: "Owner's Invalid Object Count"

Name: 1.3.6.1.4.1.111.15.1.1.1.6.1
   Kind: OctetString
   Value: "Invalid Object Owner"

Name: 1.3.6.1.4.1.111.15.1.1.1.7.1
   Kind: OctetString
   Value: "SYS"

Name: 1.3.6.1.4.1.111.15.1.1.1.8.1
   Kind: OctetString
   Value: "28-OCT-2003 04:59:10 (US/Eastern GMT)"

Name: 1.3.6.1.4.1.111.15.1.1.1.9.1
   Kind: OctetString
   Value: "Warning"

Name: 1.3.6.1.4.1.111.15.1.1.1.10.1
   Kind: OctetString
   Value: "12 object(s) are invalid in the SYS schema."

Name: 1.3.6.1.4.1.111.15.1.1.1.11.1
   Kind: OctetString
   Value: "Database Metrics"

Name: 1.3.6.1.4.1.111.15.1.1.1.12.1
   Kind: OctetString
   Value: "SYSMAN"

9.2.3 Passing Metric Severity Information

Passing metric severity attributes (severity level, type, notification rule, rule owner, or rule owner, and so on) to PL/SQL procedures or OS commands/scripts allows you to customize automated responses to alerts. For example, if an OS script opens a trouble ticket for an in-house support trouble ticket system, you will want to pass severity levels (critical, warning, and so on) to the script to open a trouble ticket with the appropriate details and escalate the problem.

9.2.3.1 Passing Information to an OS Script or Executable

The notification system passes severity information to an OS script or executable using system environment variables. Conventions used to access environmental variables vary depending on the operating system:

  • UNIX: $ENV_VARIABLE

  • Windows:%ENV_VARIABLE%

The notification system sets the following environment variables before calling the script. The script can then use any or all of these variables within the logic of the script.

Table 9-1 Environment Variables

Environment Variable Description
TARGET_NAME Name of the target on which the severity occurred.
TARGET_TYPE Type of target on which the severity occurred. Targets are defined as any monitorable service.
HOST Name of the machine on which the target resides.
METRIC Metric generating the severity.
KEY_VALUE For metrics that monitor a set of objects, the KEY_VALUE indicates the specific object that triggered the severity. For example for the Tablespace Space Used (%) metric that monitors tablespace objects, the KEY_VALUE is 'USERS' if the USERS tablespace triggered at warning or critical severity.
KEY_VALUE_NAME For metrics that monitor a set of objects, the KEY_VALUE_NAME indicates the type of object monitored. For example for the Tablespace Space Used (%) metric that monitors tablespace objects, the KEY_VALUE_NAME is 'Tablespace Name'.
TIMESTAMP Time when the severity occurred.
SEVERITY Type of severity. For example, severity types that relate to a target's availability are:
  • UP

  • DOWN

  • UNREACHABLE CLEAR

  • UNREACHABLE START

  • BLACKOUT END

  • BLACKOUT START

Other metrics can have any of the following severities:

  • WARNING

  • CRITICAL

  • CLEAR

  • METRIC ERROR CLEAR

  • METRIC ERROR START

MESSAGE Message for the alert that provides details about what triggered the condition.
RULE_NAME Name of the notification rule that resulted in the severity.
RULE_OWNER Name of the Enterprise Manager administrator who owns the rule.

Your script may reference some or all of these variables.

Example 9-8 shows an OS command script appending environment variable entries to a log file.

Example 9-8 logs a severity occurrence to a file server. If the file server is unreachable then an exit code of 100 is returned to force the Oracle Management Service Notification System to retry the notification

Example 9-8 Sample OS Command Script

#!/bin/ksh

LOG_FILE=/net/myhost/logs/severity.log
if test -f $LOG_FILE
then
echo $TARGET_NAME $MESSAGE $TIMESTAMP >> $LOG_FILE
else
   exit 100
fi

Example 9-9 shows an OS script that logs alert information to the file 'alertmsg.txt'. The file is saved to the /u1/results directory.

Example 9-9 Alert Logging Script

#!/usr/bin/sh
echo "Alert logged:" > /u1/results/alertmsg.txt
echo "\n" >> /u1/results/alertmsg.txt
echo "target name is " $TARGET_NAME >> /u1/results/alertmsg.txt
echo "target type is " $TARGET_TYPE >> /u1/results/alertmsg.txt
echo "target is on host " $HOST >> /u1/results/alertmsg.txt
echo "metric in alert is " $METRIC >> /u1/results/alertmsg.txt
echo "metric index is " $KEY_VALUE >> /u1/results/alertmsg.txt
echo "timestamp is " $TIMESTAMP >> /u1/results/alertmsg.txt
echo "severity is " $SEVERITY >> /u1/results/alertmsg.txt
echo "message is " $MESSAGE >> /u1/results/alertmsg.txt
echo "notification rule is " $RULE_NAME >> /u1/results/alertmsg.txt
echo "rule owner is " $RULE_OWNER >> /u1/results/alertmsg.txt
exit 0

Example 9-10 shows a script that sends an alert to an HP OpenView console from Enterprise Manager Grid Control. When a metric alert is triggered, the Enterprise Manager Grid Control displays the alert. The HP OpenView script is then called, invoking opcmsg and forwarding the information to the HP OpenView management server.

Example 9-10 HP OpenView Script

/opt/OV/bin/OpC/opcmsg severity="$SEVERITY" app=OEM msg_grp=Oracle msg_text="$MESSAGE" object="$TARGET"

9.2.3.2 Passing Information to a PL/SQL Procedure

The notification system passes severity information to a PL/SQL procedure using the MGMT_NOTIFY_SEVERITY object. An instance of this object is created for every alert. When an alert occurs, the notification system calls the PL/SQL procedure associated with the notification rule and passes the populated object to the procedure. The procedure is then able to access the fields of the MGMT_NOTIFY_SEVERITY object that has been passed to it.

Table 9-2 lists all metric severity attributes that can be passed:

Table 9-2 Metric Severity Attributes

Attribute Datatype Additional Information
target_name VARCHAR2(64) Name of the target on which the severity occurred.
target_type VARCHAR2(64) Type of target on which the severity occurred. Targets are defined as any monitorable service.
timezone VARCHAR2(64) The target's regional timezone
host_name VARCHAR2(128) Name of the machine on which the target resides.
metric_name VARCHAR2(64) Metric generating the severity.
metric_description VARCHAR2(128) Meaningful description of the metric that can be understood by other administrators.
metric_column VARCHAR2(64) For table metrics, the metric column contains the name of the column in the table that is being defined. If the metric that is being defined is not a table metric, the value in this column is a single space.
key_value VARCHAR2(256) For metrics that monitor a set of objects, the KEY_VALUE indicates the specific object that triggered the severity. For example for the Tablespace Space Used (%) metric that monitors tablespace objects, the KEY_VALUE is 'USERS' if the USERS tablespace triggered at warning or critical severity.
key_value_name VARCHAR2(512) For metrics that monitor a set of objects, the KEY_VALUE_NAME indicates the type of object monitored. For example for the Tablespace Space Used (%) metric that monitors tablespace objects, the KEY_VALUE_NAME is 'Tablespace Name'.
key_value_guid VARCHAR2(256) GUID associated with a composite key value name.
collection_timestamp DATE The time when the target status change was last detected and logged in the management repository.
severity_code NUMBER Numeric code identifying the severity level. See Severity Code table below.
message VARCHAR2(4000) An optional message that is generated when the alert is created that provides additional information about the alert condition.
severity_guid RAW(16) Severity global unique identifier.
metric_guid RAW(16) Metric global unique identifier.
target_guid RAW(16) Target global unique identifier.
rule_owner VARCHAR2(64) Name of the Enterprise Manager administrator who owns the rule.
rule_name VARCHAR2(132) Name of the notification rule that resulted in the severity.

When a severity occurs for the target, the notification system creates an instance of the MGMT_NOTIFY_SEVERITY object and populates it with values from the severity. The severity codes in Table 9-3 have been defined as constants in the MGMT_GLOBAL package and can be used to determine the type of severity in the severity_code field of the MGMT_NOTIFY_SEVERITY object. See Example 9-11.

Table 9-3 Severity Codes

Name Datatype Value
G_SEVERITY_COMMENT NUMBER(2) 10
G_SEVERITY_CLEAR NUMBER(2) 15
G_SEVERITY_WARNING NUMBER(2) 20
G_SEVERITY_CRITICAL NUMBER(2) 25
G_SEVERITY_UNREACHABLE_CLEAR NUMBER(3) 115
G_SEVERITY_UNREACHABLE_START NUMBER(3) 125
G_SEVERITY_BLACKOUT_END NUMBER(3) 215
G_SEVERITY_BLACKOUT_START NUMBER(3) 225
G_SEVERITY_ERROR_END NUMBER(3) 315
G_SEVERITY_ERROR_START NUMBER(3) 325
G_SEVERITY_NO_BEACONS NUMBER(3) 425
G_SEVERITY_UNKNOWN NUMBER(3) 515

Example 9-11 PL/SQL Procedure Using a Severity Code

CREATE TABLE alert_log (target_name VARCHAR2(64),
                                                alert_msg VARCHAR2(4000),
                                                occured DATE);

PROCEDURE LOG_CRITICAL_ALERTS(severity IN MGMT_NOTIFY_SEVERITY)
IS
BEGIN
        -- Log all critical severities
   IF severity.severity_code = MGMT_GLOBAL.G_SEVERITY_CRITICAL
   THEN
        BEGIN
                INSERT INTO alert_log (target_name, alert_msg, occured)
                VALUES (severity.target_name, severity.message,
                                severity.collection_timestamp);
        EXCEPTION
        WHEN OTHERS
        THEN
        -- If there are any problems then get the notification retried
                RAISE_APPLICATION_ERROR(-20000, 'Please retry');
                END;
                COMMIT;
   END IF;
END LOG_CRITICAL_ALERTS;

9.3 Notification Rules

Notification rules allow you to choose the targets and conditions for which you want to receive notifications from Enterprise Manager. The methods for sending notifications include e-mail, SNMP traps, or running custom scripts, or all three.

After you set up your notification methods, you can define the rules that Enterprise Manager will use when sending notifications. When you define the notification rules, you can choose to make them 'public' to share them with other administrators, or to keep them 'private' for your own use. When logged into the Enterprise Manager Grid Control, you can see both types of rules:

  1. Click the Preferences global link.

  2. In the Notification section of vertical navigational bar, you can click My Rules to access all the rules that you have defined.

  3. In the same navigational bar, you can click Public Rules to access all rules defined by other administrators that have been made public.

An Administrator with superuser privileges can see all rules (private and public).

9.4 Default Notification Rules

When you installed the Oracle Management Service, you would have been given an option to receive e-mail notifications for critical alerts. If you chose this option, then some default notification rules would have been created that covered the availability and critical states for the more common target types. If an e-mail address for the SYSMAN user was specified, then these rules would also be configured to send e-mail for these conditions.

Table 9-4 lists all the default notification rules. These are all owned by the SYSMAN user and are public rules.

Table 9-4 Default Notification Rules

Name Description Target Type Send Notification on the Following Availability States Send Notification on the Following Metrics and their CRITICAL and WARNING States
Application Server Availability and Critical/Warning States System-generated notification rule for monitoring Application Servers' availability, and critical and warning metric statuses. Application Servers Down

Unreachable Start

Unreachable End

Metric Label: CPU Usage (%)

Metric Name: ResourceUsage

Metric Column: Cpu.component

Metric Label: Response Time (seconds)

Metric Name: Response

Metric Column: Timing.sec

OC4J Availability and Critical/Warning States System-generated notification rule for monitoring OC4J instance's availability, and critical and warning metric statuses. OC4J Down

Unreachable Start

Unreachable End

Metric Label: CPU Usage (%)

Metric Name: ResourceUsage

Metric Column: Cpu.components

Metric Label: Request Processing Time for the OC4J Instance (seconds)

Metric Name: oc4j_instance_rollup

Metric Column: processRequest.time

Metric Label: Active Sessions for the OC4J Instance

Metric Name: oc4j_instance_rollup

Metric Column: session.active

HTTP Server Availability and Critical/Warning States System-generated notification rule for monitoring HTTP Server's availability, and critical and warning metric statuses. Oracle HTTP Server Down

Unreachable Start

Unreachable End

Metric Label: CPU Usage (%)

Metric Name: ResourceUsage

Metric Column: cpu.component

Metric Label: Request Processing Time (seconds)

Metric Name: ohs_server

Metric Column: request.currentProcessingTime

Metric Label: Active HTTP Connections

Metric Name: ohs_server

Metric Column: connection.active

Metric Label: Percentage of Busy Processes

Metric Name: ohs_server

Metric Column: busyProcesses.currentPercentage

Web Cache Availability and Critical/Warning States System-generated notification rule for monitoring Web Cache's instance's availability, and critical and warning metric statuses. Oracle Web Cache Down

Unreachable Start

Unreachable End

Metric Label: CPU Usage (%)

Metric Name: ResourceUsage

Metric Column: cpu.component

Metric Label: Hits (% if requests)

Metric Name: HIST

Metric Column: HIST__COMPUTED__HIT_RATE

Database Availability and Critical/Warning States System-generated notification rule for monitoring Databases' availability, and critical and warning metric statuses. Databases (single instance only) Down

Unreachable Start

Unreachable End

Metric Name: Alert Log

Metric Column: Archiver Hung

Metric Name: Alert Log

Metric Column: Data Block Corruption

Metric Name: User Block

Metric Column: Blocking Session Count

Metric Name: User Wait Time

Metric Column: User Wait Time (%)

Metric Name: Database Limits

Metric Column: Datafile Usage (%)

Metric Name: Database Limits

Metric Column: Lock Limit Usage (%)

Metric Name: Database Limits

Metric Column: Process Limit Usage (%)

Metric Name: Database Limits





Metric Name: Archive Area

Metric Column: Used (%)

Metric Column: Session Limit Usage (%)

Metric Name: Problem Tablespace

Metric Column: Tablespace Space Used (%)

Metric Name: Problem Tablespace

Metric Column: Segments Unable to Extend Count

Metric Name: Problem Tablespace

Metric Column: Segments Approaching MaxExtents

Listener Availability System-generated notification rule for monitoring database Listeners' availability, and critical and warning metric statuses. Listeners DownUnreachable StartUnreachable End N/A
Host Availability and Critical/Warning States System-generated notification rule for monitoring Hosts' availability, and critical and warning metric statuses. Hosts Down

Unreachable Start

Unreachable End

Metric Label: Average Disk I/O Service Time (ms)

Metric Name: DiskActivity

Metric Column: DiskActivityavserv

Metric Label: Average I/O Wait Time (ms)

Metric Name: DiskActivity

Metric Column: DiskActivityavwait

Metric Label: CPU in IO-Wait (%)

Metric Name: Load

Metric Column: cpuIOWait

Metric Label: Disk Utilization (%)

Metric Name: DiskActivity

Metric Column: DiskActivitybusy

Metric Label: Run Queue Length (5 minute average)

Metric Name: Load

Metric Column: cpuLoad

Metric Column: swapUtil

Metric Column: PctAvailable

Metric Label: File System Space Available (%)

Metric Name: Filesystems

Metric Label: Memory Page Scan Rate (per second)





Metric Name: Load

Metric Column: pgScanRate

Metric Label: CPU Utilization (%)

Metric Name: Load

Metric Column: cpuUtil

Metric Label: Memory Utilization (%)

Metric Name: Load

Metric Column: MemUsedPct

Metric Label: Network Interface Combined Utilization (%)

Metric Name: Network

Metric Label: Swap Utilization (%)

Metric Name: Load

Metric Column: totalThroughput

Repository Operations Availability System-generated notification rule for monitoring the availability of the DBMS jobs that are part of the Management Repository. Oracle Management Service and Repository Critical Metric Name: DBMS_Job_Status

Metric Column: jobUpDown

Agent Upload Problems System-generated notification rule for monitoring Agents that may have problems uploading data to the Management Service. Oracle Management Service and Repository Critical Metric Name: Targets_not_uploading

Metric Column: targetCount

Agents Unreachable System-generated notification rule for monitoring Agents that lose contact with the Management Service due to network problems, host problems or Agents going down. Agents Unreachable Start

Unreachable End

N/A

9.5 Creating Your Own Notification Rules

To create your own notification rule:

  1. From the Enterprise Manager Grid Control, click Preferences.

  2. Click My Rules in the vertical navigation bar.

    If you are not logged in as an administrator with superuser privileges, you will see a link for My Rules instead of Notification Rules as in the case of an administrator with superuser privileges.

  3. Click Create.

    Enterprise Manager displays the Create Notification Rule wizard. Follow the instructions in the wizard to create your notification rule.

    When you specify the notification rule properties, check Make Public in the Properties page of the wizard if you want other non-privileged users to be able to view and share that rule. For example, it allows other administrators to later specify that they should receive e-mail for this rule.

    When you specify the notification rule, you will only be able to choose from e-mail and SNMP traps. Specifying custom commands and PL/SQL procedures is an option which is only available to privileged users.

9.6 Getting Email Notifications

If you want to receive notifications by email, you will need to specify your e-mail address in the Preferences General page. In addition to defining notification e-mail addresses, you associate the notification message format (long or short) to be used for each e-mail address.

Each e-mail address can have up to 132 characters; there is no upper bound with the number of e-mail addresses.

To add an e-mail address:

  1. From the Grid Control, click Preferences at the top of the page. By default the General page is selected.

  2. Click Add Another Row to create a new e-mail entry field in the E-mail Addresses table.

  3. Specify the e-mail associated with your Enterprise Manager account. All e-mail notifications you receive from Enterprise Manager will be sent to the e-mail addresses you specify.

    For example, user1@oracle.com

    Select the message format for your e-mail address. The Long Format sends a HTML formatted e-mail that contains detailed information about an alert. Example 9-12 shows a typical notification that uses the long format.

    The Short Format (Example 9-13) sends a concise text e-mail that is limited to 155 characters thereby allowing the e-mail be received as an SMS message or page. The subject contains the severity type (for example, Critical) and the target name. The body contains the time the severity occurred and the severity message. Since the message length is limited to 155 character, some of this information may be truncated. If truncation has occurred there will be a series of dots at the end of the message.

  4. Click Apply to save your e-mail address.

Example 9-12 Long E-mail Notification

Name=myhost.com
Type=Host
Host=myhost.com
Metric=Filesystem Space Available (%)
Mount Point =/usr
Timestamp=06-OCT-2003 16:27:05 US/Pacific
Severity=Warning
Message=Filesystem / has only 76.07% available space
Rule Name=Host Availability and Critical States
Rule Owner=SYSMAN

Example 9-13 Short E-mail notification

Subject is :
EM:Unreachable Start:myhost
Body is :
Nov 16, 2003 2:02:19 PM EST:Agent is Unreachable (REASON = Connection refused) 
but the host is UP

9.6.1 Notification Schedules

Once you have defined your e-mail notification addresses, you will need to define a notification schedule. For example, if your e-mail addresses are user1@oracle.com, user2@oracle.com, user3@oracle.com, you can choose to use one or more of these e-mail addresses for each time period in your notification schedule.

A notification schedule is a rotating schedule used by Enterprise Manager to determine how to send e-mail notifications to administrators. Each administrator has exactly one notification schedule. When an alert needs to be e-mailed to an administrator, Enterprise Manager consults that administrator's notification schedule to determine the e-mail address to be used.

To define a notification schedule:

  1. From the Enterprise Manager Grid Control, click Preferences at the top of the page. By default the General page is selected.

  2. Click Notification Schedule in the vertical navigation bar.

    The Enterprise Manager Grid Control displays the Notification Schedule page.

  3. Follow the directions on the Notification Schedule page to specify what times you should be notified by e-mail.

9.6.2 Using Out-of-Box Notification Rules

Enterprise Manager creates a comprehensive set of predefined notification rules for the most common target types. These default rules are adequate for most notification needs situations. See "Default Notification Rules" for more information. If these rules meet your needs, you can choose to receive e-mail for them by selecting the rule from the Preferences Rules or Public Rules page, then click the Assign Methods button.

9.6.3 Creating Your Own Notification Rules

If you find that the default notification rules do not meet your needs, you can define your own custom rules. See "Notification Rules".

The e-mail format is HTML. The target Name is a link to the target in the Grid Control. The metric name is a link to the metric in the Grid Control.

9.7 Configuring Methods for Rules

After you set up your notification method or methods and created rules, you can associate the rules with multiple notification methods.

  1. From the Enterprise Manager Grid Control, click Preferences at the top of the page.

  2. Click Notification Rules in the vertical navigation bar.

    The Enterprise Manager Grid Control displays the Notification Rules page. Any notification rules already created are listed in the Notification Rules table.

  3. Select the radio button next to the rule for which you want to configure a method.

  4. Click Configure Methods.

  5. Specify the notification methods that should occur when metric severities are met.

    Choose the Send Me E-mail option and specify one or more e-mail addresses to which notifications will be sent; then choose a notification method from the list of notification methods.

Once you have defined your notification methods and have decided which notification rules to use (predefined or custom), you need to define the association between various methods and rules. If you have a large number of rules, methods, or both, Enterprise Manager provides an easy way to perform method-rule mapping. "Assigning Methods to Rules" and "Assigning Rules to Methods" illustrate how to perform this mapping quickly and easily.

9.8 Assigning Methods to Rules

For each notification rule, you can assign one or more notification methods to be called as a result of alert occurrences.

  1. From the Enterprise Manager Grid Control, click Preferences at the top of the page.

  2. Click Notification Rules in the vertical navigation bar.

    The Enterprise Manager Grid Control displays the Notification Rules page. Any notification rules already created are listed in the Notification Rules table.

  3. Click Assign Methods to Multiple Rules.

  4. Perform your assignments.

Figure 9-2 Assigning Methods to Rules

Shows the Assign Methods to Multiple rule page
Description of the illustration notif_rule.gif

9.9 Assigning Rules to Methods

For each notification method, you can associate one or more notification rules that will use that method to send notifications.

  1. From the Enterprise Manager Grid Control, click Preferences at the top of the page.

  2. Click Notification Rules in the vertical navigation bar.

    The Enterprise Manager Grid Control displays the Notification Rules page. Any notification rules already created are listed in the Notification Rules table.

  3. Click Assign Methods to Multiple Rules.

  4. From the View menu, select By Method.

  5. Perform your assignments.

Figure 9-3 Assign Rules to Methods

Description of notif_method.gif follows
Description of the illustration notif_method.gif

9.10 Management Information Base (MIB)

While SNMP allows Enterprise Manager to send information to third-party SNMP-enabled applications, there may be situations where you want SNMP-enabled applications to obtain information from Enterprise Manager. This is accomplished using management information base (MIB) variables. The following sections discuss Enterprise Manager MIB variables in detail.

9.10.1 About MIBs

A MIB is a text file, written in ASN.1 notation, which describes the variables containing the information that SNMP can access. The variables described in a MIB, which are also called MIB objects, are the items that can be monitored using SNMP. There is one MIB for each element being monitored. Each monolithic or subagent consults its respective MIB in order to learn the variables it can retrieve and their characteristics. The encapsulation of this information in the MIB is what enables master agents to register new subagents dynamically — everything the master agent needs to know about the subagent is contained in its MIB. The management framework and management applications also consult these MIBs for the same purpose. MIBs can be either standard (also called public) or proprietary (also called private or vendor).

The actual values of the variables are not part of the MIB, but are retrieved through a platform-dependent process called "instrumentation". The concept of the MIB is very important because all SNMP communications refer to one or more MIB objects. What is transmitted to the framework is, essentially, MIB variables and their current values.

9.10.2 Reading the MIB Variable Descriptions

This section covers the format used to describe MIB variables. Note that the STATUS element of SNMP MIB definition, Version 2, is not included in these MIB variable descriptions. Since Oracle has implemented all MIB variables as CURRENT, this value does not vary.

9.10.2.1 Variable Name

Syntax

Maps to the SYNTAX element of SNMP MIB definition, Version 2.

Max-Access

Maps to the MAX-ACCESS element of SNMP MIB definition, Version 2.

Status

Maps to the STATUS element of SNMP MIB definition, Version 2.

Explanation

Describes the function, use and precise derivation of the variable. (For example, a variable might be derived from a particular configuration file parameter or performance table field.) When appropriate, incorporates the DESCRIPTION part of the MIB definition, Version 2.

Typical Range

Describes the typical, rather than theoretical, range of the variable. For example, while integer values for many MIB variables can theoretically range up to 4294967295, a typical range in an actual installation will vary to a lesser extent. On the other hand, some variable values for a large database can actually exceed this "theoretical" limit (a "wraparound"). Specifying that a variable value typically ranges from 0 to 1,000 or 1,000 to 3 billion will help the third-party developer to develop the most useful graphical display for the variable.

Significance

Describes the significance of the variable when monitoring a typical installation. Alternative ratings are Very Important, Important, Less Important, or Not Normally Used. Clearly, the DBA will want to monitor some variables more closely than others. However, which variables fall into this category can vary from installation to installation, depending on the application, the size of the database, and on the DBA's objectives. Nevertheless, assessing a variable's significance relative to the other variables in the MIB can help third-party developers focus their efforts on those variables of most interest to the most DBAs.

Related Variables

Lists other variables in this MIB, or other MIBs implemented by Oracle, that relate in some way to this variable. For example, the value of this variable might derive from that of another MIB variable. Or perhaps the value of this variable varies inversely to that of another variable. Knowing this information, third-party developers can develop useful graphic displays of related MIB variables.

Suggested Presentation

Suggests how this variable can be presented most usefully to the DBA using the management application: as a simple value, as a gauge, or as an alarm, for example.

9.10.3 MIB Definition

Example 9-14 shows a typical MIB definition used by Enterprise Manager.

Example 9-14 MIB Definition

ORACLE-ENTERPRISE-MANAGER-4-MIB DEFINITIONS ::= BEGIN

IMPORTS
        TRAP-TYPE
                FROM RFC-1215
        DisplayString
                FROM RFC1213-MIB
        OBJECT-TYPE
                FROM RFC-1212
        enterprises
                FROM RFC1155-SMI;

oracle OBJECT IDENTIFIER ::= { enterprises  111 }

oraEM4 OBJECT IDENTIFIER ::= { oracle  15 }

oraEM4Objects OBJECT IDENTIFIER ::= { oraEM4  1 }

oraEM4AlertTable OBJECT-TYPE
    SYNTAX  SEQUENCE OF OraEM4AlertEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
     "Information on alerts generated by Oracle Enterprise Manager. This table 
is not queryable; it exists only to document the variables included in the
oraEM4Alert trap.  Each trap contains a single instance of each variable in the
table."
    ::= { oraEM4Objects  1 }

oraEM4AlertEntry OBJECT-TYPE
    SYNTAX  OraEM4AlertEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
     "Information about a particular Oracle Enterprise Manager alert."
    INDEX   { oraEM4AlertIndex }
    ::= { oraEM4AlertTable  1 }

OraEM4AlertEntry ::=
    SEQUENCE {
        oraEM4AlertIndex
            INTEGER,

        oraEM4AlertTargetName
           DisplayString,

        oraEM4AlertTargetType
           DisplayString,

        oraEM4AlertHostName
           DisplayString,

        oraEM4AlertMetricName
           DisplayString,

        oraEM4AlertKeyName
           DisplayString,

        oraEM4AlertKeyValue
           DisplayString,

        oraEM4AlertTimeStamp
           DisplayString,

        oraEM4AlertSeverity
           DisplayString,

        oraEM4AlertMessage
           DisplayString,

        oraEM4AlertRuleName
           DisplayString

        oraEM4AlertRuleOwner
           DisplayString
    }

oraEM4AlertIndex OBJECT-TYPE
    SYNTAX  INTEGER
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "Index of a particular alert, unique only at the moment an alert is generated."
    ::= { oraEM4AlertEntry  1 }

oraEM4AlertTargetName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the target to which this alert applies."
    ::= { oraEM4AlertEntry  2 }

oraEM4AlertTargetType OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The type of the target to which this alert applies."
    ::= { oraEM4AlertEntry  3 }

oraEM4AlertHostName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the host on which this alert originated."
    ::= { oraEM4AlertEntry  4 }

oraEM4AlertMetricName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the metric which generated this alert."
    ::= { oraEM4AlertEntry  5 }

oraEM4AlertKeyName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the key-column, if present, for the metric which generated this alert."
    ::= { oraEM4AlertEntry  6 }

oraEM4AlertKeyValue OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The value of the key-column, if present, for the metric which generated this alert."
    ::= { oraEM4AlertEntry  7 }

oraEM4AlertTimeStamp OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The time at which this alert was generated."
    ::= { oraEM4AlertEntry  8 }

oraEM4AlertSeverity OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The severity of the alert e.g. Critical."
    ::= { oraEM4AlertEntry  9 }

oraEM4AlertMessage OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The message associated with the alert."
    ::= { oraEM4AlertEntry  10 }

oraEM4AlertRuleName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the notification rule that caused this notification."
    ::= { oraEM4AlertEntry  11 }

oraEM4AlertRuleOwner OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The owner of the notification rule that caused this notification."
    ::= { oraEM4AlertEntry  12 }

oraEM4Traps OBJECT IDENTIFIER ::= { oraEM4  2 }

oraEM4Alert TRAP-TYPE
    ENTERPRISE  oraEM4Traps
    VARIABLES   { oraEM4AlertTargetName, oraEM4AlertTargetType, 
                  oraEM4AlertHostName, oraEM4AlertMetricName,
                  oraEM4AlertKeyName, oraEM4AlertKeyValue, oraEM4AlertTimeStamp,
                  oraEM4AlertSeverity, oraEM4AlertMessage,
                  oraEM4AlertRuleName, oraEM4AlertRuleOwner }
    DESCRIPTION
     "The variables included in the oraEM4Alert trap."
    ::= 1


END