Skip Headers
Oracle® Enterprise Manager Connectors Integration Guide
12c Release 2 (12.1.0.2)

Part Number E25163-02
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

2 Building an Event Connector

This chapter provides information that you need to build an event connector and integrate it with Enterprise Manager.

This chapter has the following sections:

Introduction

Enterprise Manager Cloud Control 12c provides a Management Connector Framework (referred to as Connector Framework) that enables developers to build event connectors based on metadata (XMLs and XSLs). The event connector allows Enterprise Manager to send generated events to external systems.

The following metadata categories are required to build an event connector:

Note:

The current release only supports outbound operations (sending events to external systems). The support for inbound (importing) external events into Enterprise Manager may be considered for future release.

Building an Event Connector

Building an event connector is a two step process that involves writing a deployment descriptor and preparing the appropriate templates to manage the data. The connector descriptor contains information on the following:

Note:

In an upgrade scenario, all external alerts migrated to 12c as Enterprise Manager events will not be shown on the target page. Customers need to manually create Incidents for these events so that they can be shown on the target page.

In a fresh 12c install scenario, inbound operations are not supported so no external events will be generated and nothing will be shown on the target page.

Defining the Connector Descriptor File

Define a connector descriptor XML file to describe the connector metadata and the configuration properties of the connector, such as Web service end points and authentication schema.

Key points to remember while constructing the constructor descriptor:

Refer to the sample connectorDeploy.xml in Appendix C, "MOM Event Connector Samples" for reference implementation. The following table provides a break-down of the sections of conenctorDeploy.xsd and explains what each section does.

Table 2-1 Connector Descriptor Metadata Details

Metadata Section Description
<Name>Microsoft Operations Manager  Connector</Name>
  <Version>12.1.0.1.0</Version>
  <EMCompatibleVersion>12.1.0.1.0</EMCompatibleVersion>
  <Description>Microsoft Operations Manager  Integration with Enterprise Manager</Description>
  <Category>EventConnector</Category>
  <ConfigVariable required="true">
    <VariableName>SETUP_NAME</VariableName>
    <DisplayName>MOM Registered Connector Name</DisplayName>
  </ConfigVariable>
  <ConfigVariable required="true">
    <VariableName>RESOLUTION_STATE</VariableName>
    <DisplayName>Resolution State</DisplayName>
  </ConfigVariable>

The connector type name & version element value combination uniquely define a connector instance in EM, hence proper consideration needs to be given while defining the same.

The element EMCompatibleVersion is equals to <release specific value>.

Example, 12.1.0.1.0 for 12C release.

The element category for external system integration can take one of the following values:

EventConnector

TicketingConnector

In this case, the value will be EventConnector.

The ConnectivityTestVariable & ExternalURL elements are not applicable for event connector.

<Service>
    <Method>cleanup</Method>
    <WebServiceEndpoint>
      <![CDATA[http://[server]:1271/ConnectorServiceV2.asmx]]>
    </WebServiceEndpoint>
    <SOAPAction>http://www.microsoft.com/EnterpriseManagement/Mom/Connector/V2/Cleanup</SOAPAction>
  </Service>

Method defines one of the EM specific service name.

Web service end point defines the external system url.

SoapAction defines the operation that needs to be invoked at external system.

Refer to the Service Definition Section for more details.

<TemplateRegistration>
    <FileName>setup_request.xml</FileName>
    <InternalName>setup</InternalName>
    <TemplateName>Setup</TemplateName>
    <TemplateType>OutboundXML</TemplateType>
    <Description>This is the request xml file for setup method</Description>    
  </TemplateRegistration>

Template Registration defines the definition of XML or XSL template.

Refer to the Template Definition section for more details.

<SOAPHeaderAuthentication>
    <Username required="true">
      <VariableName>USERNAME</VariableName>
      <DisplayName>Username</DisplayName>
    </Username>
    <Password>
      <VariableName>PASSWORD</VariableName>
      <DisplayName> Password</DisplayName>
    </Password>
    <AuthVariable>
      <VariableName>AUTHENTICATION</VariableName>
      <DisplayName>Authentication</DisplayName>
    </AuthVariable>
    <AuthVariable>
      <VariableName>LOCALE</VariableName>
      <DisplayName>Locale</DisplayName>
    </AuthVariable>
    <AuthVariable>
      <VariableName>TIMEZONE</VariableName>
      <DisplayName>Timezone</DisplayName>
    </AuthVariable>
 
    <SOAPHeader>
     <![CDATA[
     ]]>
    </SOAPHeader>
  </SOAPHeaderAuthentication>

(Optional) This section allows you to describe the authentication schema of external system Web services.

The authentication section of the Configure Management Connector page in EM is generated based on this section.

The username, password, and additional text fields are populated based on this section.

  • The <VariableName> tag marks the name of the attribute in the Web services XML document.

  • The <DisplayName> tag describes how the corresponding text-box should be labeled.


Service Definition

The event connector service operations defined in the following table are supported in the current release:

Table 2-2 Connector Service Operations

Name Description

setup (optional)

Register a connector with external system

Initialize (optional)

Initialize a connector with external system after setup

Uninitialize (optional)

Un-initializes the connector with the external event system

Cleanup (optional)

De-registers the connector with the external event system.

createEvent

Forward a new event to external system

updateEvent

Forward event updates to external system


The following are the key points for the above mentioned services:

The following is an example for setup service:

<Service>
          <Method>setup</Method>
              <WebServiceEndpoint>....</WebServiceEndpoint>
              <SOAPAction>.......</SOAPAction>
   </Service>

Template Definition

Templates contains data that gets transformed while sending a request and receiving a response. A template can be defined as an XML or XSL file for a particular service operation in Enterprise Manager.

The following are the guidelines for defining any template:

Template Registration

Coding template registration XML or XSL is driven by the following:

Table illustrate the list of schema definition for Enterprise Manager Event Connector.

Table 2-3 Event Connector Template XSD

Name Description

EMEvent.xsd

Defines an EM event made available through the connector framework.

ConnectorCommon.xsd

Defines all the data types used in all the other xsds, for example, SourceObjInfoType.

EMEventResponse.xsd

Defines the response of the createEvent/updateEvent method. The response is from the external server for an Event Manager event it has received.

initialize_response.xsd

Provides the schema of the response for an initialize method.

setupResponse.xsd

Provides the schema of the response for a setup method.

uninitialize_response.xsd

Provides the schema of the response for an uninitialize method.


The following are the key points for defining the request templates:

The following are the key points for defining the response templates:

After the transformation, Enterprise Manager expects a <SuccessFlag> and one of the following elements depending on the value:

Refer to following sample template files in Table 2-4, "Sample Template List" for reference MOM event connector implementation:

Table 2-4 Sample Template List

Service Name Request XSL Request XML Response XSL

setup

Optional

setup_request.xml

setup_response.xsl

initialize

Optional

initialize_request.xml

Optional

uninitialize

Optional

uninitialize_request.xml

Optional

cleanup

Optional

cleanup_request.xml

Optional

createEvent

createEvent_request.xsl

Not applicable

createEvent_response.xsl

updateEvent

updateEvent_request.xsl

Not applicable

updateEvent_response.xsl


Packaging and Deploying the Connector

To deploy the connector, Enterprise Manager uses the Self Update feature. This feature, which can be accessed through the console, provides the ability to import the connector into the Enterprise Manager environment. To deploy the connector complete the following:

  1. Prepare the connector jar file

    Package all XML and XSL template files as a .jar file

    <name>_connector.jar
                    ---> connectorDeploy.xml
                    --->template1.xml
                    --->template2.xsl
                    …..
                    …..
                    --->templateN.xsl
    
  2. Prepare the manifest file

    The following table lists the Key attributes of self update manifest files:

    Table 2-5 Self Update Manifest File Attributes

    Name Description

    EntityType

    Value is core_connector

    EntityTypeVersion

    Current release version. Value=12.1.0.1.0

    Attribute @Name=connector_type

    Connector type name

    Attribute @Name=connector_category

    Category type can be TicketingConnector or EventConnector

    ArchiveList

    This element contains the list of archives that are part of connector setup. Generally there will be single connector jar but for some special implementation there may be additional jars(adapter or agent). In these cases, the connector specific jar should be first one in the defined list. This is mandatory requirement.


    The following example shows the code for the connector_manifest.xml file:

    <EntityInstanceList xmlns="http://www.oracle.com/EnterpriseGridControl/SelfUpdateManifest">
     <EntityInstance xmlns="http://www.oracle.com/EnterpriseGridControl/SelfUpdateManifest" EntityTypeVersion="11.2.0.1.0" EntityType="core_connector" Maturity="PRODUCTION" Vendor="Oracle" PluginID="oracle.sysman.core">
     <Description>
     <![CDATA[ BMC Remedy Service Desk Connector - 12.1.0.2.0
      ]]>
      </Description>
     <AttributeList>
      <Version>12.1.0.2.0</Version>
      <Attribute Name="connector_type" Value="Sample SCOM Connector" Label="Sample SCOM Connector" />
      <Attribute Name="connector_category" Value="EventConnector" Label="Event Connector" />
      </AttributeList>
     <Readme>
     <![CDATA[   Oracle Management Connector for SCOM integrates Oracle Enterprise Manager Cloud Control's proactive alert detect
    ion and resolution features with BMC's Remedy 7.0 Service Desk capabilities to provide a seamless workflow for incident mana
    gement and resolution.
      Change Logs:
      12.1.0.2.0
       - Miscellaneous bug fixes
       - Performance enhancements
      ]]>
      </Readme>
      <DependsOn />
     <ArchiveList>
      <Archive Filename="scomconnector.jar" IsMDS="false" />
      <Archive Filename="SCOM_webservices_adapter.jar" IsMDS="false" />
      </ArchiveList>
     <CustomData>
     <![CDATA[
      ]]>
      </CustomData>
     </EntityInstance>
     </EntityInstanceList>
    

    Refer to the self update schema definition from following location for a complete list of attributes:

    $ORACLE_HOME/sysman/emSDK/core/selfupdate/model/SelfUpdateManifest.xsd
    
  3. Configure the emedk tool

    The emedk tool can be configured by following instructions from the Enterprise Manager user interface. The path is Setup > Extensibility > Development Kit.

  4. Prepare the self-update archive

    This requires the connector jar file and the manifest file for the connector. To prepare self-update, call the following utility to create a self update archive file:

    edkUtil prepare_update
            -manifest "manifest xml"
            -archivedir "archives directory"
            -out "output file or directory"
            [-typexml "update type xml"]
    

    Table 2-6 Self Update Utility Options

    Option Description

    -manifest

    Self update manifest file that describes the update.

    -archivedir

    Directory containing the archive files specified in the manifest file.

    -out

    Directory or filename for the self update archive. If a directory is specified, the filename is autogenerated.

    -typexml

    Optional path to the update type xml


    The following example creates a self update archive in the /u01/sar directory based on the manifest file /u01/connector/connector_manifest.xml. The archives referred to in connector_manifest.xml are picked from the directory /u01/connector/archives.

    edkUtil prepare_update
              -manifest /u01/connector/connector_manifest.xml
              -archivedir /u01/connector/archives
              -out  /u01/sar/sample_connector.zip
    
  5. Import the connector archive to Enterprise Manager by calling any one of the following emcli commands:

    emcli import_update        
      -file=\ file\         
      -omslocal
    

    or

    emcli import_update  
    -file=\ file\         
    -host=\ hostname\
    [-credential_set_name=\ setname\ ] | -credential_name=\ name\  -credential_owner=\ owner\
    

    These commands import a Self Update archive file into Enterprise Manager. On successful import, the update is displayed on the Self Update Home in downloaded status for further action. Table 2-7 describes the connector archive command options.

    Table 2-7 Connector Archive Command Options

    Options Description

    -file

    The complete pathname of the update archive file

    -omslocal

    The flag specifying that the file is accessible from the OMS

    -host

    The target name for a host target where the file is available

    -credential_set_name

    The set name of the preferred credential stored in the repository for the host target. Can be one of the following:

    • HostCredsNormal

      Default unprivileged credential set

    • HostCredsPriv

      Privileged credential set

    -credential_name

    The name of a named credential stored in the repository. This option must be specified along with -credential_owner option.

    -credential_owner

    The owner of a named credential stored in the repository. This option must be specified along with -credential_name option.


    The following paragraphs provide some examples of the use of the emcli command:

    Example 1

    Imports the file update1.zip. The file must be present on the OMS host. In a multiple OMS setup, the request can be processed by any OMS, so the file should be accessible from the OMS processing the request. This usually means that the file must be kept on a shared location that is accessible from all OMS.

    emcli import_update        
      -file=\ /u01/common/update1.zip\         
      -omslocal  
    

    Example 2

    Imports the file update1.zip that is present on the host1.example.com host. The host must be a managed host target in Enterprise Manager and the agent on this host must be up and running. The preferred unprivileged credentials for host host1.example.com are used to retrieve the remote file.

    emcli import_update        
      -file=\ /u01/common/update1.zip\         
      -host=\ host1.example.com\         
      -credential_set_name=\ HostCredsNormal\ 
    

    Example 3

    Imports the file update1.zip that is present on the host1.example.com host. The host must be a managed host target in Enterprise Manager and the agent on this host must be up and running. The named credentials \ host1_creds\ owned by user \ admin1\ are used to retrieve the remote file.

    emcli import_update        
      -file=\ /u01/common/update1.zip\         
      -host=\ host1.example.com\         
      -credential_name=\ host1_creds\         
      -credential_owner=\ admin1\ 
    
  6. Go to Self-Update Home page

    The connector will be shown as downloaded.

  7. Select the connector row and click Apply to deploy the connector.