The notifications may look similar to the following examples when they are delivered.
The e-mail format is HTML. The target Name is a link to the target in the Console. The metric name is a link to the metric in the Console.
Long E-mail Example:
Name=myhost.com
Type=Host
Host=myhost.com
Metric=Filesystem Space Available (%)
Mount Point =/usr
Timestamp=06-OCT-2006 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
Short E-mail Example:
Subject is :
EM:Unreachable Start:myhost
Body is :
Nov 16, 2006 2:02:19 PM EST:Agent is Unreachable (REASON = Connection refused)
but the host is UP
An example SNMP Trap is shown below. 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: "database3"
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: "hsunnaa07.us.oracle.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"
The following environment variables will be set when an OS Command is called. They will contain similar values to those in the examples for E-mail and SNMP Trap.
TARGET_NAME
TARGET_TYPE
HOST
METRIC
KEY_VALUE
KEY_VALUE_NAME
TIMESTAMP
SEVERITY
MESSAGE
RULE_NAME
RULE_OWNER
From within a script on UNIX, the variables can be accessed as $TARGET_NAME, $TARGET_TYPE, and others.
From within a script on a Windows platform, the variables can be accessed as %TARGET_NAME%, %TARGET_TYPE%, and others.
Sample Script :
#!/bin/ksh
# This logs a severity occurence to a file server. If the file server
# is unreachable then an exit code of 100 is returned to force the # OMS Notification
System to retry the notification
LOG_FILE=/net/myhost/logs/severity.log if test -f $LOG_FILE then echo
$TARGET_NAME $MESSAGE $TIMESTAMP >> $LOG_FILE else exit 100 fi
Related Topics
Enterprise Manager Information Roadmap
Copyright © 1996, 2007, Oracle. All rights reserved.