This chapter provides details on the default event templates shipped along with the SCOM connectors. The event templates specify the mappings between an Enterprise Manager event attributes and SCOM web service attributes:
Note:
Unless otherwise noted, these instructions apply to the SCOM 2012 connector and to the SCOM 2007 connectors. Instructions specific to the SCOM 2007 connectors are available in Microsoft SCOM 2007 Connector.
This section describes the default mappings between the Enterprise Manager event data fields and the Microsoft SCOM alert data fields.
The event templates XML Style Sheet (XSL) files contain the mappings between the two systems. These files are located in the Self Update archive that was installed in Installing the Microsoft SCOM Event Connector. To extract the installation file, perform the steps in Exporting the Template Files.
Table 5-1 lists the XSL files that perform the mappings for the SCOM 2012 connector and provides a summary of each. Table E-1 lists the XSL files that perform the mappings for the SCOM 2007 connectors and provides a summary of each.
Table 5-1 XSL Files that Perform SCOM 2012 Mappings
File | Description |
---|---|
|
Transforms the Oracle Enterprise Manager event data to the Microsoft SCOM 2012 alert format for the |
|
Transforms the Oracle Enterprise Manager event data to the Microsoft SCOM 2012 alert format for the |
|
Alternate template that transforms the Oracle Enterprise Manager event data to the Microsoft SCOM 2012 alert format for the |
The following sections provide details about the default templates:
This section identifies the default create mappings for the SCOM 2012 connector. To see the default create mappings for the SCOM 2007 connectors, refer to section Create Event 2007 Template in Microsoft SCOM 2007 Connector.
The Oracle Enterprise Manager Connector Framework invokes the createEvent
operation whenever an event is generated in Oracle Enterprise Manager and a rule is configured to invoke the SCOM 2012 connector. The createEvent_request_2012.xsl
template is invoked during the process to transform the data from Oracle Enterprise Manager format to SCOM 2012 alert format.Table 5-2 lists the default field mappings between the Microsoft SCOM alert and the Oracle Enterprise Manager event and the Microsoft SCOM 2012 alert.
Table 5-2 Create Event Template Mappings
SCOM Field Name | Required | Value |
---|---|---|
Name |
Yes |
Set to the event |
Description |
Yes |
Set to the formatted contents of the event as specified in Formatted Enterprise Manager Description Contents. |
Priority |
Yes |
Set the priority based on the event priority. See Priority Mapping for details. |
Severity |
Yes |
Set the severity based on the event severity. See Severity Mapping for details. |
Alert History |
No |
Set to the formatted contents of the event as specified in Formatted Alert History Create Contents. |
This section identifies the default update mappings for the SCOM 2012 connector. To see the default update mappings for the SCOM 2007 connectors, refer to Update Event 2007 Template in Microsoft SCOM 2007 Connector.
The Oracle Enterprise Manager Connector Framework invokes the updateEvent
operation whenever an event is generated in Oracle Enterprise Manager and a rule is configured to invoke the SCOM 2012 connector.
Example 5-1 Default Template
If the updateEvent
operation is configured to use the default template, the updateEvent_request_2102.xsl
template is invoked during the process to transform the data from Oracle Enterprise Manager format to SCOM 2012 alert format.Table 5-3 lists the default field mappings between the Microsoft SCOM alert and the Oracle Enterprise Manager event and the Microsoft SCOM 2012 alert.
Table 5-3 Update Event Template Mappings
SCOM Field Name | Required | Value |
---|---|---|
ID |
Yes |
Set to the event ExternalEventId field. |
Resolution State |
Yes |
Set to 255 (Closed) if the event severity is Clear. Otherwise, set to 0 (New). |
Alert History |
No |
Set to "Oracle Enterprise Manager cleared alert" if the event severity is Clear. Set to "Oracle Enterprise Manager changed alert severity to warning" if the event severity is Warning. Set to "Oracle Enterprise Manager changed alert severity to critical" if the event severity is Critical. Not set for other severity values. |
Example 5-2 Alternate Template
If the updateEvent
operation has been reconfigured to use the alternate template, the updateEvent_request_2012_alt.xsl
template is invoked during the process to transform the data from Oracle Enterprise Manager format to SCOM 2012 alert format.
Table 5-4 lists the default field mappings between the Oracle Enterprise Manager event and the Microsoft SCOM 2012 alert when the status is clear.
Table 5-5 lists the default field mappings between the Oracle Enterprise Manager event and the Microsoft SCOM 2012 alert for all other status values.
Table 5-4 Clear Event Alternate Template Mappings
SCOM Field Name | Required | Value |
---|---|---|
ID |
Yes |
Set to the event |
Resolution State |
Yes |
Set to 255 (Closed). |
Alert History |
No |
Set to "Oracle Enterprise Manager cleared alert" |
Table 5-5 Update Event Alternate Template Mappings
SCOM Field Name | Required | Value |
---|---|---|
Name |
Yes |
Set to the event |
Description |
Yes |
Set to the formatted contents of the event as specified in Formatted Enterprise Manager Description Contents. |
Priority |
Yes |
Set the priority based on the event priority. SeePriority Mapping for details. |
Severity |
Yes |
Set the severity based on the event severity. SeeSeverity Mapping for details. |
Alert History |
No |
If the synchronization feature is enabled, entries will be added to the history log for all events leading up to and including the update. The original create entry will be formatted as specified in Formatted Alert History Create Contents. Each update entry will be formatted as specified in Formatted Alert History Update Contents. If the synchronization feature is disabled, an entry will be added to the alert history log that is formatted as specified in Formatted Alert History Update Contents. |
Listed below is the format used by the templates for the Description fields. Text delimited by angle brackets (< and >) designates an Enterprise Manager Event field name that will be replaced by the actual field contents. Lines marked with double asterisks indicate they will only be present if the designated event field contains data. The Notes section below contains information about some of the fields.
Received event reported by Oracle Enterprise Manager: Occurred Date: <OccurredDate> ReportedDate: <ReportedDate> Event Class: <EventClass> Event Name: <EventName> Target Type: <SourceInfo/TargetInfo/TargetType> Target Name: <SourceInfo/TargetInfo/TargetName> Severity: <Severity> Message: <Message> Event URL: <EventURL> Target Properties:** <TargetProperty/Name>: <TargetProperty/Value>** Event Context:** <EventContextAttributes/StringAttribute/Name>: <EventContextAttributes/StringAttribute/Value>**
Notes
The Target Properties section will only be present if the event contains target property values. Listed below are some sample target property name/value pairs:
Line of business: Finance
Owner: Finance-DB Team
The Event Context section will only be present if the event contains event context attribute values. There can be StringAttribute or NumberAttribute values that contain a name/value pair.
Event URL is set to the URL of the event details page in Enterprise Manager. Copy the URL to a browser to directly view the event in Enterprise Manager.
Listed below is the format used by the templates for the Alert History field for createEvent
operations. Text delimited by angle brackets (< and >) designates an Enterprise Manager Event field name that will be replaced by the actual field contents. Lines marked with double asterisks indicate they will only be present if the designated event field contains data. The Note section below contains information about some of the fields.
Oracle Enterprise Manager created an event with the following attributes: Message: <Message> Severity: <Severity> Reported Date: <ReportedDate> Occurred Date: <OccurredDate> Target Name: <SourceInfo/TargetInfo/TargetName> Target Type: <SourceInfo/TargetInfo/TargetType> Event Class: <EventClass> Event Name: <EventName> Event URL: <EventURL> Target Properties:** <TargetProperty/Name>: <TargetProperty/Value>** Event Context:** <EventContextAttributes/StringAttribute/Name>: < EventContextAttributes/StringAttribute /Value>**
Note:
The Target Properties section will only be present if the event contains target property values. Listed below are some sample target property name/value pairs:
Line of business: Finance
Owner: Finance-DB Team
The Event Context section will only be present if the event contains event context attribute values. There can be StringAttribute
or NumberAttribute
values that contain a name/value pair.
Listed below is the format used by the templates for the Alert History field for updateEvent operations. The Title used is specified in Alert History Title. Text delimited by angle brackets (< and >) designates an Enterprise Manager Event field name that will be replaced by the actual field contents.
Title Reported Date: <ReportDate> Message: <Message> Severity: <Severity>
Table 5-6 shows the title that is specified for the Alert History field for updateEvent
operations. The value used is based on the severity specified in the Enterprise Manager event information.
Table 5-6 Alert History Titles
Event Severity | Title |
---|---|
Clear |
Oracle Enterprise Manager cleared event. |
Warning |
Oracle Enterprise Manager changed event severity to Warning. |
Critical |
Oracle Enterprise Manager changed event severity to Critical. |
All Others |
No title is specified. |
The SCOM alert severity is set based on the Enterprise Manager event severity value. The following table shows the values used when creating the alert in SCOM.
When the event severity is … | Set the alert severity to … |
---|---|
Fatal |
Error |
Critical |
Error |
Warning |
Warning |
Minor Warning |
Warning |
Informational |
Information |
Clear |
Information |
The SCOM alert priority is set based on the Enterprise Manager event priority value. The following table shows the values used when creating the alert in SCOM.
When the event priority is ... | Set the alert priority to … |
---|---|
Fatal | High |
Critical | High |
Warning | Normal |
Minor Warning | Normal |
Informational | Low |
Clear | Low |
Although the default mappings are sufficient for most implementations, you can change them as needed. The following sections discuss:
It is assumed that you already have a good understanding of XSL.
For reference information on the SCOM mappings, see Customizing Microsoft SCOM.
The sample below shows the format that the Oracle Enterprise Manager Connector Framework provides when an event is created or updated in Oracle Enterprise Manager. For a description of the fields, see Field Descriptions for XML Format of Events.
Example 5-3 XML Format of Events
<EMEvent xmlns="http://xmlns.oracle.com/sysman/connector"> <ConnectorGUID/> <ExternalEventID/> <NotificationRuleOwner/> <NotificationRuleName/> <ConnectorVariable> <VariableName/> <VariableValue/> </ConnectorVariable> <ConnectorVariable> <VariableName/> <VariableValue/> </ConnectorVariable> <Property> <Name/> <Value/> </Property> <Property> <Name/> <Value/> </Property> <SystemAttributes> <EventClass/> <EventID/> <SequenceID/> <OccurredDate/> <ReportedDate/> <DisplayTZ/> <EventName/> <Severity/> <SeverityCode/> <SourceInfo> <SourceObjInfo> <ObjID/> <ObjName/> <ObjOwner/> <SourceObjType/> <SourceObjSubType/> </SourceObjInfo> <TargetInfo> <TargetGUID/> <TargetName/> <TargetType/> <TargetTypeLabel/> <TargetURL/> <TargetProperty> <Name/> <Value/> </TargetProperty> <TargetProperty> <Name/> <Value/> </TargetProperty> </TargetInfo> </SourceInfo> <Message/> <ActionMessage/> <EventURL/> <AutoClose/> <EventCategory/> <EventCategory/> </SystemAttributes> <EventClassSpecificAttributes> <RawAttribute> <Name/> <Value/> </RawAttribute> <StringAttribute> <Name/> <Value/> </StringAttribute> </EventClassSpecificAttributes> <EventContextAttributes> <NumberAttribute> <Name/> <Value/> </NumberAttribute> <NumberAttribute> <Name/> <Value/> </NumberAttribute> </EventContextAttributes> </EMEvent>
Table 5-7 provides a description of the key fields shown in XML Format of Oracle Enterprise Manager Events that are used in the default mappings:
Table 5-7 Field Descriptions for XML Format of Events
Field | Description |
---|---|
ExternalEventId |
Unique identifier of the message in Microsoft SCOM. This will only be set for updates. |
EventClass |
Identifies the type of event |
OccurredDate |
Date/time the event occurred |
ReportedDate |
Date/time the event was reported by OMS |
EventName |
Descriptive name of the event |
Severity |
Severity of the event: Fatal, Critical, Warning, Minor_Warning, Informational, or Clear |
SeverityCode |
Severity code for the event: FATAL, CRITICAL, WARNING, MINOR_WARNING, INFORMATIONAL, or CLEAR |
TargetName |
Target name that is a unique instance of the target type |
TargetType |
Display name of the target type for which the event was generated |
TargetProperty |
Additional target properties that do not have a specific field in the event model (name:value pair) |
Message |
Description of the event |
EventURL |
Link to the web page for the event |
EventContextAttributes |
Additional event properties that do not have a specific field in the event model (name:value pair) |
Oracle Enterprise Manager includes the functionality to allow you to manage templates within Cloud Control. Templates, which are included as part of the connector installation, are automatically registered and are shown within Enterprise Manager.
To begin:
This section explains how to customize the mapping between Enterprise Manager and the Microsoft SCOM web service. The procedure provides the steps required for changing a mapping.
See Template Customization Example for an example of how to customize templates.
For information on customizing SCOM, see Customizing Microsoft SCOM.
A template is an XSLT file that transforms an input XML format to an output XML format. To make the mapping changes, you need to understand the input XML format being transformed and the output XML being generated by the template. The input document is the XML document that contains the Enterprise Manager event information. The output document is the request being sent to the SCOM web service. The output XML document must conform to the data format specified in the SCOM EventService WSDL.
EventService
web service fields and the field names in SCOM. Listed below are the steps you should follow to modify the template file./create/event/extended-fields/string-field
XML path.This section documents how to register connectors using the emctl command line command. Since new templates cannot be defined for event connectors, the only reason you would need this command is to reregister a default connector that was deleted from the Enterprise Manager Cloud Control console.
To register a template, run the following emctl register_template connector
command as a user with execute privilege on emctl and the ability to read the template:
$ORACLE_HOME/bin/emctl register_template connector -t <template.xsl> -repos_pwd <reposPassword> -cname <connectorName> -iname <internalName> -tname <templateName> -ttype 2 [-d <description>]
<template.xsl>
is the full path name of the template file.
<reposPassword>
is the Enterprise Manager root (Super Administrator) password.
<connectorName>
is the name of the connector instance installed in step 5 of Creating a Connector Instance.
<internalName>
is the internal name to use for the template.
<templateName>
is the name to display for the template.
<description>
is the description of the template.
createEvent
template for the connector instance with the name of SCOM 2012:
emctl register_template connector -t /home/oracle/customized_templates/createEvent_request.xml -repos_pwd <password> -cname "SCOM 2012" -iname "createEvent" -tname "Create Event Request" -ttype 2 -d "Demo template"
By default, the alert name in the Microsoft SCOM 2012 alert is set to the Oracle Enterprise Manager metric column, and no custom fields are mapped.
The alert name is modified to use a hard-coded value of Event From Oracle Enterprise Manager.
Custom field 1 is set to the Target Type.
Custom field 2 is set to the Target Name.