Oracle® Enterprise Manager Advanced Configuration 10g Release 1 (10.1) Part Number B12013-01 |
|
|
View PDF |
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:
Notifications are configured using Notification Methods and Notification Rules.
Notification Methods are the mechanisms by which alerts are sent. Enterprise Manager superusers can setup e-mail notifications by configuring the 'e-mail' notification method. Most likely this would already have been setup as part of the Oracle Management Service installation.
Enterprise Manager superusers can also define other custom notification methods. For example, alerts may need to be forwarded to a 3rd party trouble-ticketing system. Assuming APIs to the third-party trouble-ticketing system are available, a custom notification method can be created to call a custom OS script that has the appropriate APIs. The custom notification method can be named in a user-friendly fashion, for example, "Log trouble ticket". Once that's defined, any time an administrator needs to send alerts to the trouble-ticketing system, he merely needs to invoke the now globally available notification method called "Log trouble ticket".
Custom notification methods can be defined based on any custom OS script, any custom PL/SQL procedure, or by sending SNMP traps.
A notification rule is a user-defined rule that instructs Enterprise Manager on how alerts should be sent. Specifically, in each rule, you can specify the alert conditions you're interested in and the notification methods that should be used for sending these alerts. For example, you can set up a rule such that when any database goes down, e-mail should be sent and the "log trouble ticket" notification method should be called. Or you can define another rule such that when the CPU or Memory Utilization of any host reach critical severities, SNMP traps should be sent to another management console. During notification rule creation, you specify the targets you are interested in, their monitored metrics and severity conditions (clear, warning, critical), and the associated notification method.
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:
Set up the outgoing mail servers if you plan to send e-mail notifications through notification rules
Create other custom notification methods using OS and PL/SQL scripts and SNMP traps.
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
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.
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.
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.
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.
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" .
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.
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.
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.
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.
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.
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.
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"
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.
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:
Other metrics can have any of the following severities:
|
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.
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;
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:
Click the Preferences global link.
In the Notification section of vertical navigational bar, you can click My Rules to access all the rules that you have defined.
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).
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
To create your own notification rule:
From the Enterprise Manager Grid Control, click Preferences.
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.
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.
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:
From the Grid Control, click Preferences at the top of the page. By default the General page is selected.
Click Add Another Row to create a new e-mail entry field in the E-mail Addresses table.
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.
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
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:
From the Enterprise Manager Grid Control, click Preferences at the top of the page. By default the General page is selected.
Click Notification Schedule in the vertical navigation bar.
The Enterprise Manager Grid Control displays the Notification Schedule page.
Follow the directions on the Notification Schedule page to specify what times you should be notified by e-mail.
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.
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.
After you set up your notification method or methods and created rules, you can associate the rules with multiple notification methods.
From the Enterprise Manager Grid Control, click Preferences at the top of the page.
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.
Select the radio button next to the rule for which you want to configure a method.
Click Configure Methods.
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.
For each notification rule, you can assign one or more notification methods to be called as a result of alert occurrences.
From the Enterprise Manager Grid Control, click Preferences at the top of the page.
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.
Click Assign Methods to Multiple Rules.
Perform your assignments.
For each notification method, you can associate one or more notification rules that will use that method to send notifications.
From the Enterprise Manager Grid Control, click Preferences at the top of the page.
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.
Click Assign Methods to Multiple Rules.
From the View menu, select By Method.
Perform your assignments.
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.
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.
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.
Maps to the SYNTAX element of SNMP MIB definition, Version 2.
Maps to the MAX-ACCESS element of SNMP MIB definition, Version 2.
Maps to the STATUS element of SNMP MIB definition, Version 2.
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.
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.
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.
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.
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.
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