SOI - Add attributes to alerts from a service using Event Policies
search cancel

SOI - Add attributes to alerts from a service using Event Policies


Article ID: 217171


Updated On:


CA Service Operations Insight (SOI)


How can we enrich alarms coming from any CI under a specific service? 


Release : 4.2



The below example explains how to add the tag "NCC" to all alerts coming in from any of the CI that belong to a particular service (in this case TestService). 

To deploy an even policy to enrich alarms from the following steps can be followed. 

The below steps needs to be performed to create and deploy the policy file:
NOTE: You need to follow the same steps to reduce the policy creation effort.

1) Create a new EventPolicy with name:(Eg.) "NCCPolicy" of "JDBC" type by providing correct DB details and deploy on either a specific connector or on MTC connector.
NOTE:: If MTC connector is selected to deploy the event policy, no other connector needs to be selected because that policy gets applied on alerts from ALL the connectors

2) Open following folders:
CA\SOI\resources\EventManagement\Policies : open file NCCPolicy.policy
CA\SOI\resources\Core\Catalogpolicy\extensions : Open file/files with name like *nccpolicy.xml

3) Search for <EventClass> tag and copy complete <EventClass> tag in notepad

4) Replace complete <EventClass> tag with the following in any one file above first and update correct DB details from the copied content in notepad:

<EventClass name='NCCPolicy' extends='Alert'>
        <Field conditional='AlertedMdrElementID' output='NCCPolicy_ciid' format='{0}' input='AlertedMdrElementID' />
        <Field output="jdbcNCCPolicy" outputtype="pairedlist" type="jdbc" 
        query="select BNodeCIID from CIRelationship where serviceciid in (select ciid from CIStaging where label='TestService') and BNodeCIID in (select ciid from cistaging where cinamespacemapid=?)"
        <Field conditional='jdbcNCCPolicy_BNodeCIID_0' output='userAttribute10' format='NCC' input='jdbcNCCPolicy_BNodeCIID_0' />

NOTE:: Update the following in <EventClass> tag as required:
 Update "TestService" with the service name on which you want to apply this policy
 Update "userAttribute10" with the required user attribute which is used in the alert queue condition to apply clear alarm policy

5) Copy the above updated <EventClass> tag in all open files in #2 step above.

6) Save all files and Restart Integration Service

NOTE:: Eventpolicy is of strict type and case sensitive. If you want to create event policy file with different name, make sure that you are updating it correctly in <EventClass> tag. Any small mistake will take lots of time to debug and correct it.

Additional Information

Related KB:

SOI - Alarms do not respect Escalation Policy if they are on maintenance (