Using the actionrule that was posted in this thread and it has worked well to set a Custom 1 field value for all spectrumgtw alarms pulled into UIM. However, we have a need to set the Custom 1 field differently for certain alarms based on text. Does anyone out there in the community know the best way to go about this?
I've tried the actionrule.xml below, and several different variations with no luck. Whenever I add an additional condition, no messages get the Custom 1 field set even if it doesn't match the message text. My thought is to use the <not></not> element to prevent the "BIGIP LTM VS UNAVAIL" alert to not have the Custom1 field be set to "NetNet". And then use another rule to set it differently. Any help would be appreciated.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventRules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<items>
<item id="d5aa0a48-8117-400d-9c9c-0275c743918f" name="Auto-assign alarms" xsi:type="ActionManagerRule">
<enabled>true</enabled>
<eventTypes>
<eventType>com.ca.uim.ems.alarm.created</eventType>
</eventTypes>
<alarmFilter>
<conditions>
<condition propertyName="applicationId" operator="Equals" xsi:type="StringFilterCondition">
<value>SPECTRUM</value>
<condition propertyName="message" value="BIGIP LTM VS UNAVAIL" xsi:type="StringFilterCondition">
<value>"BIGIP LTM VS UNAVAIL"</value>
<not>true</not>
</condition>
</conditions>
</alarmFilter>
<actions>
<action xsi:type="GroovyAction">
<script>
<![CDATA[
Map<String, Object> updates = new HashMap<>()
updates.put("custom_1", "NetNet")
Map<String, Object> removes = null
getAlarmService().updateProperties(getAlarmContext(), updates, removes)
]]>
</script>
</action>
</actions>
</item>
</items>
</eventRules>
Thanks,
Larry
Original Message:
Sent: 10-02-2018 03:48 AM
From: Toshi Longkumer
Subject: Re: Spectrumgtw events to NAS and nas Alarm_enrichment
Credit to CA support for this