Tech Tip : How to add the Occurrences attribute from Specturm to SOI

Document created by kluong Employee on Sep 15, 2014
Version 1Show Document
  • View in full screen mode

NOTE:  Before editing any files, always make a backup of those files.

Here are the steps to add the Occurrences attribute from Specturm to SOI.

 

Spectrum Connector version needs to be at least 2.0.0.178

On the Spectrum connector system:

1) Stop CA SAM Integration Services

2) Edit \CA\SOI\resources\Configurations\SpectrumIM\AdditionalAttributes.xml

In the <Alarms> section, add this line <Attribute id="0x11fc5" name="Occurrences"/>

like this

 

<AdditionalAttributes>

  <Models>

    <!-- <Attribute id="0x23000d" name="Location"/> -->

  </Models>

  <Alarms>

    <!-- <Attribute id="0x11f4f" name="Alarm_Status"/> -->

<Attribute id="0x11fc5" name="Occurrences"/>

  </Alarms>

</AdditionalAttributes>

 

Save the file.

 

3) Edit \CA\SOI\resources\Core\Catalogpolicy\spectrumim_policy.xml

In the <EventClass name="Alert"> section inside <Format>, add this line

<Field conditional='Occurrences' output='userAttribute3' format='{0}' input='Occurrences' />

 

NOTE: You can assign the Occurrences attribute to any userAttribute(1,2,3,4) that are not

            being use.  In this example, it is being assign to userAttribute3.

 

<EventClass name="Alert">

<Parse>

                              <Field input="Trouble_Ticket_ID" pattern=".*sdTicketHandle=\'(.*?)\'.*(Request/Incident|Issue) (\d+).*" output="sdTicketHandle,sdType,Incident" />

                              <Field input="Trouble_Ticket_ID" pattern=".*href=\'(.*?)\'.*" output="href" />

                              <Field input="Trouble_Ticket_ID" pattern=".*ticketUrl=\'(.*?)\'.*" output="ticketUrl" />

               </Parse>

    <Format>          

       <Field output="ClassName" format="Alert" input="" />

                  <Field output="CAProductIdentifier" format="00005" input="" />

                  <Field output="MdrProduct" format="CA:{0}" input="CAProductIdentifier" />

       <!--<Field output="MdrProdInstance" format="Spectrum-{0}" input="domainName" />-->

       <Field conditional='ConnectorConfigMdrProdInstance' output='MdrProdInstance' format='{0}' input='ConnectorConfigMdrProdInstance' />

       <Field output="MdrElementID" format="{0}" input="alarmID" />

       <Field output="IsAcknowledgeable" format="{0}" input="Acknowledgeable" />

       <Field conditional="Creation_Date" output="OccurrenceTimestamp" format="{0}" input="{xsdateTime(Creation_Date)}" />

       <Field conditional="OccurrenceTimestamp" output="ReportTimestamp" format="{0}" input="OccurrenceTimestamp" />

       <Field conditional="severity" output="Severity" format="{0}" input="severity" />

       <Field conditional="causeText" output="Summary" format="{0}" input="causeText" />

       <Field conditional="Summary" output="Message" format="{0}" input="Summary" />

       <Field conditional="eventDetail" output="Message" format="{0}" input="eventDetail" />

       <Field conditional="User_Clearable" output="IsClearable" format="{0}" input="User_Clearable" />

       <Field conditional="Acknowledged" output="IsAcknowledged" format="{0}" input="Acknowledged" />

       <Field conditional="type" output="AlertType" format="{0}" input="type" />

       <Field output="AlertedMdrProduct" format="CA:00005" input="" />

       <Field conditional="MdrProdInstance" output="AlertedMdrProdInstance" format="{0}" input="MdrProdInstance" />

       <Field conditional="Model_Handle" output="AlertedMdrElementID" format="{0}" input="Model_Handle" />

                  <Field conditional="sdTicketHandle" output="RelatedIncident" format="{0},{1}" input="sdTicketHandle,Incident" />             

                  <Field conditional="href" output="RelatedIncidentUrl" format="{0}" input="href" />

                  <Field conditional="ticketUrl" output="RelatedIncidentUrl" format="{0}" input="ticketUrl" />

                  <Field conditional="TroubleShooter" output="AssigneeUserName" format="{0}" input="TroubleShooter" />

                  <Field conditional="alertDiagnosis" output="AlertDiagnosis" format="{0}" input="alertDiagnosis" />

                  <Field conditional="causedByAlerts" output="CausedByAlerts" format="{0}" input="causedByAlerts" />

                  <Field conditional="causedAlerts" output="CausedAlerts" format="{0}" input="causedAlerts" />

                  <Field conditional="isCleared" output="IsCleared" format="{0}" input="isCleared" />

                  <Field conditional='Occurrences' output='userAttribute3' format='{0}' input='Occurrences' />

    </Format>

    <Write>

      <Field type="file" name="Alert.out" properties="*" />

      <Field type="publishcache" properties="ClassName,MdrProduct,MdrProdInstance,MdrElementID,OccurrenceTimestamp,ReportTimestamp,Severity,AlertedItem,Summary,Message,IsClearable,IsAcknowledged,Assignee,AlertType,AlertedMdrProduct,AlertedMdrProdInstance,AlertedMdrElementID,RelatedIncidentUrl,RelatedIncident,IsAcknowledgeable,AlertDiagnosis,CausedByAlerts,CausedAlerts,IsCleared" />

    </Write>

</EventClass>

 

 

Save the file and restart CA SAM Integration Services.

 

In the SOI Console,  an alarm will show the Occurrences value in the User Attribute (3) column.

Attachments

    Outcomes