Previous Topic: Sample Connector Policy ImplementationNext Topic: Inbound Policy Examples


Outbound Policy Example

The following policy example shows how the provided Sample connector outbound policy transforms sample data of the System class to the ComputerSystem USM CI type:

<EventClass name='Item' >
  <Classify>
    <Field input='class' pattern='^System$' output='eventtype' 
    outval='ComputerSystem' />
  </Classify>

The classify operation classifies CIs with a class of System to the USM type of ComputerSystem. This operation directs all specialized processing to occur under the policy for the ComputerSystem event class. The object also inherits policy operations from the parent Item event class.

  <Normalize>
    <Field output='MdrProdInstance' outputtype='ref' type='map' 
    input='MdrProdInstance' >
      <mapentry mapin='^MdrProdInstance$' mapout='{fqdn(localhost)}' />
      <mapentry mapin='localhost' mapout='{fqdn(localhost)}' />
    </Field>
  </Normalize>

The normalize operation in the generic Item event class derives the name of the local host to include as the source of the information.

  <Format>
    <!-- Five digit CA Product identifier as defined by the USM 
    MdrProductEnum -->
    <Field output='CAProductIdentifier' format='09998' input='' />
    <Field output='MdrProduct' format='CA:{0}' input='CAProductIdentifier' />
    <!-- MdrProdInstance setup above in normalize section
    <Field output='MdrProdInstance' format='{0}' input='{fqdn(localhost)}' /-->
    <Field conditional='id' output='MdrElementID' format='{0}' input='id' />
    <Field output="UrlParams" format="http://{0}:8080?id={1}" 
    input="MdrProdInstance,MdrElementID" />
    <Field conditional='description' output='Description' format='{0}' 
    input='description' />
    <Field conditional='name' output='Label' format='{0}' input='name' />
  </Format>

The format operations in the generic Item event class add the '09998' identifier to any data retrieved from the Sample connector. Every connector has a similar identifier that is included in the final USM entity. Other operations configure the basic CI properties related to the data source.

<EventClass name='ComputerSystem' extends='Item' >
  <Format>
  <!-- Assign class name -->
    <Field output='ClassName' format='ComputerSystem' input='' />
    <!-- Correlatable properties, must populate at least one -->
    <Field conditional='dnsname' output='PrimaryDnsName' format='{0}' 
    input='dnsname' />
    <Field conditional='sysname' output='SysName' format='{0}' input='sysname' />
    <Field conditional='macaddress' output='PrimaryMacAddress' format='{0}' 
    input='macaddress' />
    <Field conditional='ip_address' output='PrimaryIPV4Address' format='{0}' 
    input='ip_address' />
    <!-- Non-Correlatable properties -->
    <Field conditional='name' output='ComputerName' format='{0}' input='name' />
  </Format>

The format operation in the ComputerSystem event class converts the properties from the source Sample connector CI format to the USM format. Properties such as DNS name, sysname, and MAC address are converted to the standard USM format. After all format operations complete, the CI is a USM entity.