4 Working with Event Templates

This chapter provides information about the default event templates shipped with the IBM Tivoli Netcool/OMNIbus REST Connector.

Event templates are XML transformation style sheets that map Enterprise Manager event attributes to Netcool/OMNIbus alert attributes.

The Netcool/OMNIbus REST Event connector contains predefined event templates for Create and Update event operations on the Netcool/OMNIbus system. You can customize these templates to fulfill your particular requirements. Oracle recommends that you back up these factory-built templates before customizing them.

This chapter discusses the following topics:

Default Templates

This section describes the default mappings between the Enterprise Manager event data fields and the Netcool/OMNIbus alert data fields.

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 Connector in Enterprise Manager.

Table 4-1 lists the XSL files that perform the mappings and provides a summary of each.

Table 4-1 XSL Files That Perform Mappings

File Description

createEvent_request.xsl

Transforms the Oracle Enterprise Manager event data to the IBM Netcool/OMNIbus alert format for the createEvent operation.

updateEvent_request.xsl

Transforms the Oracle Enterprise Manager event data to the IBM Netcool/OMNIbus alert format for the updateEvent operation.

Create Event Template

The Oracle Enterprise Manager Connector Framework invokes the createEvent operation whenever an event is generated in Oracle Enterprise Manager and there is a rule configured to invoke the Netcool/OMNIbus connector. createEvent_request.xsl is invoked during the process to transform the data from Oracle Enterprise Manager format to Netcool/OMNIbus alert format. Table 4-2 lists the default field mappings between the IBM Tivoli Netcool/OMNIbus alert and the Oracle Enterprise Manager event.

Table 4-2 Netcool/OMNIbus Field Name

Netcool/OMNIbus Field Name Value

Identifier

Set to the event EventId field.

Node

Set to the event TargetName field.

NodeAlias

Set to the event TargetName field followed by the Target_Host property information.

Manager

Hard coded to "Oracle Enterprise Manager."

Agent

Set to the event NotificationRuleName field.

Summary

Set to the event Message field.

Severity

Set the severity based on the event severity as specified in Severity Mappings.

AlertGroup

Set to the event EventCategory field.

AlertKey

Set to the EventClass field followed by the event EventName field.

FirstOccurence

Set to the event ReportedDate field.

LastOccurrence

Set to the event ReportedDate field.

URL

Set to the event EventURL field.

Type

Problem

Update Event Template

The Oracle Enterprise Manager Connector Framework invokes the updateEvent operation whenever an event is updated in Oracle Enterprise Manager and there is a rule configured to invoke the Netcool/OMNIbus REST Event connector. updateEvent_request.xsl is invoked during the process to transform the data from Oracle Enterprise Manager format to Netcool/OMNIbus alert format. Table 4-3 lists the default field mappings between the IBM Netcool/OMNIbus alert and the Oracle Enterprise Manager event.

Table 4-3 Update Event Template Mapping

Netcool/OMNIbus Field Name Value

Severity

Set the severity based on the event severity as specified in Severity Mappings.

Summary

Set to the event Message field.

LastOccurrence

Set to the event ReportedDate field.

Severity Mappings

The Netcool/OMNIbus alert severity is set based on the Enterprise Manager event severity value. Table 4-4 shows the values used when creating the alert in Netcool/OMNIbus.

Table 4-4 Netcool/OMNIbus Alert Severity Mappings

When the event severity is ... Set the alert severity to ...

Clear

0

Informational

1

Minor Warning

2

Warning

2

Critical

5

Fatal

5

Customizing Event Mappings

If the out-of-box event templates do not satisfy your requirements, you can modify them. To do this, Oracle recommends that you use one of the existing templates as the base template. Copy the event template to a new file, modify, and register the new event template.

You can edit a template directly on Enterprise Manager instead of using the EM CLI command.

See Editing Templates and Restoring Templates for more information.

In most cases, when you modify the event template, you might only be changing the mappings. The following examples illustrate this concept:

Example 4-5 Make Warning Severity set to ‘5’ in IBM Tivoli Netcool/OMNIbus

To create a template to change warning severity to high urgency, change the following attribute in the template under the variable severity from:

<xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'WARNING'">2</xsl:when>

to:

<xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'WARNING'">5</xsl:when> 

Example 4-2 Change the Type from “Problem” to “Information”

If you only want the event in IBM Tivoli Netcool/OMNIbus to not be reported as a problem, but rather as informational, find the section labeled Type field and make the following change:

<number name="Type">13</number>

The templates are highly customizable. Oracle recommends that only users with advanced knowledge of XSLT make complex changes.

You can use event rules as a filter to associate proper event templates with events. You can have as many event templates as desired.