Skip Headers
Oracle® Enterprise Manager Installation and Configuration Guide for IBM Tivoli Enterprise Console Connector
Release 1.0.4.1.0

Part Number E14038-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

4 Changing Default Configurations

This chapter explains how to change default mappings and default port numbers. This chapter discusses the following topics:

Customizing Mappings

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 default mappings, see Appendix A, "Default Mappings".

XML Format of IBM TEC Events

Example 4–1 represents the format that the IBM TEC web service expects for creating new events in IBM TEC. The format for update requests is the same, except the root node would be "update" instead of "create."

Example 4-1 Sample Format for IBM TEC Web Service

<iwaveaf:create xmlns:iwaveaf="http://iwavesoftware.com/services/  adapter-framework">
  <event>
    <description></description>
    <status></status>
    <severity></severity>
    <repeatCount></repeatCount>
    <createDate></createDate>
    <eventClass>
      <name>OracleEnterpriseManager</name>
    </eventClass>
    <group>
      <name>PrimaryServer</name>
    </group>
    <object>
      <computerName></computerName>
      <displayName></displayName>
    </object>
    <source>
      <computerName></computerName>
      <name>OracleEnterpriseManager</name>
    </source>
    <extended-fields>
      <string-field name="ext_id"></string-field>
      <string-field name="sub_source">OracleEnterpriseManager</string-field>
    </extended-fields>
  </event>
</iwaveaf:create>

Mappings Between XML Format and Event Field Names

Table 4–1 identifies the mappings between the IBM TEC base event slot names and the XML format that the IBM TEC web services uses. The XML document presented to the IBM TEC web service must have the corresponding fields set. This must be handled in the appropriate translation file identified in Table A–1.

Table 4-1 Event Attributes and XML Path Mappings

IBM TEC Slot Names XML Path

Class Name

/create/event/eventClass/name

msg

/create/event/description

status

/create/event/status

severity

/create/event/severity

repeat_count

/create/event/repeatCount

date

/create/event/createDate

fqhostname

/create/event/object/displayName

hostname

/create/event/object/computerName

source

/create/event/source/name

origin

/create/event/source/computerName

All other slot names

See "Extended Fields" below.


Extended Fields

Extended fields pass information for slots that are not mapped. An extended field is defined as a <string-field/> element that is a child of the extended-fields node. The name of the slot is specified in the name attribute, and the value of the slot is specified in the value attribute.

XML Format of Oracle Enterprise Manager Alerts

Example 4–2 shows the format that the Oracle Enterprise Manager Connector Framework provides when an alert is created or updated in Oracle Enterprise Manager.

Example 4-2 XML Format of Alerts

<EMEvent>
  <EventGuid/>
  <ExternalEventId/>
  <ViolationId/>
  <TargetType/>
  <TargetName/>
  <MetricName/>
  <MetricColumn/>
  <KeyValues/>
  <Message/>
  <Severity/>
  <SeverityCode/>
  <CollectionTime/>
  <EventPageURL/>
  <EMUser/>
  <NotificationRuleName/>
  <TargetHost/>
  <TargetTimezone/>
  <Property>
    <Name/>
    <Value/>
  </Property>
</EMEvent>

Table 4–2 provides a description of the fields shown in Example 4–2.

Table 4-2 Field Descriptions for XML Format

Field Description

EventGuid

Unique identifier of the alert in Oracle Enterprise Manager.

ExternalEventId

Unique identifier of the event in IBM TEC. This will only be set for updates.

CollectionTime

Time the alert was generated.

TargetType

Target type for which the alert was generated.

TargetName

Target name that is a unique instance of the target type.

MetricName

Name of the metric that was violated.

MetricColumn

Column under the metric that was violated.

KeyValues

Key values associated with the metric column that was violated.

Severity

Severity text assigned to the alert.

SeverityCode

Severity numeric code assigned to the alert.

EMUser

User that owns the rule that generated the alert.

NotificationRuleName

Name of the notification rule that caused the alert to be forwarded to IBM TEC.

EventPageURL

Link to the web page for the alert.

Message

Description of the alert.

TargetHost

Host name of the system where the target resides.

TargetTimezone

Time zone of the system where the target resides.

Property

Additional properties that do not have a specific field in the alert model.


Changing a Mapping

This section explains how to customize the mapping between Enterprise Manager and the IBM TEC web service. The procedure provides the steps required for changing a mapping. Following this procedure, an example is provided that shows how to change the mapping of the target type and target name fields.

  1. Study the default mapping and determine the changes you want to make. See Appendix A for details about the default mappings and the files that define the mapping for the different Enterprise Manager operations.

  2. Create a back-up copy of the XSL file you want to change.

  3. Open the XSL file in a text editor or in an XSLT editor.

  4. Change the file to map the fields as determined in step 1. You might need to study the information in Section 4.1.1 and Section 4.1.2. These sections describe the data formats of the IBM TEC events and Oracle Enterprise Manager alerts.

  5. Save your changes.

The files are now ready for integration. You do not need to stop and start OMS. The changes will automatically be picked up.

Example of Changing a Mapping

By default, the origin slot in the IBM TEC event is set to the Oracle Enterprise Manager target type, and the sub_origin slot is set to the target name. The following example shows how to change the value where the target type and name information is placed in TEC. In this example, the target_type and target_name slots were added to the class definition to contain this information.

The changes made to the default mapping are as follows:

  • The origin slot is modified to use a hard-coded value of Oracle Enterprise Manager.

  • The sub_origin slot is not set to any value.

  • The new target_type slot is set to the Oracle Enterprise Manager target type.

  • The new target_name slot is set to the Oracle Enterprise Manager target name.

  1. Make a back-up copy of the createEvent_request.xsl file and name it default_createEvent_request.xsl.

  2. Make a backup copy of the updateEvent_request.xsl file and name it default_updateEvent_request.xsl.

  3. Open the createEvent_request.xsl file in your text editor.

  4. Change the appropriate sections to reflect the new mapping.

    • Before Changes

      The code below shows the impacted sections in the file before the changes.

      <source>  <!-- TEC slot = source -->  <name>OracleEnterpriseManager</name>  <!-- TEC slot = origin -->  <computerName>    <xsl:value-of select="a:TargetType"/>  </computerName></source>…<extended-fields>  <!-- TEC fields that are not mapped to the common object model -->  <string-field name="action_flag">CREATE</string-field>  <string-field name="ext_id">    <xsl:value-of select="a:EventGuid"/>  </string-field>  <string-field name="sub_source">OracleEnterpriseManager</string-field>  <string-field name="sub_origin">    <xsl:value-of select="a:TargetName"/>  </string-field></extended-fields>
      
    • After Changes

      The code below shows the Extended Fields section in the file after the changes. The changes are shown in bold.

      <source>
        <!-- TEC slot = source -->
        <name>OracleEnterpriseManager</name>
        <!-- TEC slot = origin -->
        <computerName>Oracle Enterprise Manager</computerName>
      </source>
      …
      <extended-fields>
        <!-- TEC fields that are not mapped to the common object model -->
        <string-field name="action_flag">CREATE</string-field>
        <string-field name="ext_id">
          <xsl:value-of select="a:EventGuid"/>
        </string-field>
        <string-field name="sub_source">OracleEnterpriseManager</string-field>
        <string-field name="target_type">
          <xsl:value-of select="a:TargetType"/>
        </string-field>
        <string-field name="target_name">
          <xsl:value-of select="a:TargetName"/>
        </string-field>
      </extended-fields>
      
  5. Save your changes after making the updates.

  6. Open the updateEvent_request.xsl file and make the same changes. In this case, you cannot just cut and paste the Extended Fields section, because there are some differences between the create and update translations. You will need to edit them separately.

  7. Save your changes after making the updates.

Changing Default Port Numbers

In most cases, you can use the default port numbers that the IBM TEC web service uses. However, if there are any conflicts with existing applications, you need to change the port numbers.

8080 is the default port number for HTTP communication, and 8443 is the default port for HTTPS communication. To change the port number, perform the following steps on the system where the IBM TEC web services are installed. Replace <TECWS_INSTALL> with the directory where the IBM TEC web services are installed.

  1. Open a command prompt window and change the working directory to:

    <TECWS_INSTALL>/adapters/conf

  2. Enter the following command to configure the web service to connect to the IBM TEC Agent...

    ../bin/propertiesEditor.bat -p
    services.url=<prot>://localhost:<newPort>/
    services framework.properties
    

    ... where <prot> is the protocol (HTTPS or HTTPS) and <newPort> is the new port number.

    The propertiesEditor.bat script is specifically for the Windows platform. The equivalent script for Unix platforms is propertiesEditor.sh.

  3. Make a backup copy of the framework.properties file.

  4. Open the framework.properties file with a text editor and replace all references to the old port number with the new port number, then save the file.

    Note:

    If the old port number is 8443, you will not find any references to the old port number.
  5. Change the working directory to ../bin.

  6. Enter the following command to restart the IBM TEC web service.

    • If the web service is installed on a Unix system:

      ./service.sh restart

    • If the web service is installed on a Windows system as a standalone application, close the window where the adapter was running, then run:

      startAdapters.bat

    • If the web service is installed on a Windows system as a Windows service, enter the following commands:

      net stop iWaveAdapters

      net start iWaveAdapters

Perform the following steps to change the URL the TEC connector is using:

  1. Log in to the Oracle Enterprise Manager console by entering a user name with a 'Super Administrator' role, entering the appropriate password, then clicking Login.

  2. Click the Setup link at the top right part of the window. The Overview of Setup page appears.

  3. Click the Management Connectors link on the left side of the window. The Management Connectors page appears, which shows the installed connectors.

  4. Click on the Configure icon associated with the TEC Connector. This invokes edit mode, enabling you to configure the connector.

  5. Change the URLs listed in the Web Service End Points section to use the new port number.

  6. Click OK to save your changes.