How to prevent Spectrum AlarmNotifier updatescript to make notification on clear alarms
search cancel

How to prevent Spectrum AlarmNotifier updatescript to make notification on clear alarms


Article ID: 144287


Updated On:


CA Spectrum


We have a problem were both the notifier update and clear script runs when an alarm is cleared and so we receive 2 notifications in the 3rd party service desk integration.
This can duplicate the service desk workload as they get 2 emails for every clear notification. 
For the integration to work, we only want the update script to run for updates but not clears.



Release : 10.3

Component : Spectrum Core / SpectroSERVER


We document that the UpdateScript is invoked when:

• A troubleshooter has been assigned to an alarm, or the troubleshooter name has been changed. The RepairPerson parameter in the scripts represents this troubleshooter name.
• The status of an alarm has changed. Status information for an alarm is entered in the Alarms tab. The AlarmStatus parameter represents status in the scripts.
• An alarm is acknowledged or unacknowledged in CA Spectrum.
• A new event, or a change to an existing event, occurs on a device that is in an alarm state.
So it is functioning as designed that both an update and clear alarms are triggered on clear.


Here the Update before clear is getting triggered by Event messages added/correlated to the Alarm. 
e.g. the Management Alarm got an update when a new Event message e.g.  "is again responding to primary management requests" is added. 

There are 2 options here.

Disabling all the Event Updates i.e. An alarm SET comes with an Event Message, but there won't be any Updates sent for any new Event change happens.
To do in Notifier/.alarmrc set SEND_EVENT_UPDATES=FALSE

Customize the UpdateScript to ignore the Updates just before the clear based on an Attribute, maybe Clear Time Attribute.
To do, please add the Clear Time attribute to .alarmrc like below

EXTRA_ATTRS_AS_ARGS=0x0023000e,0x129af <= Here 0x0023000e is already existing attr for Device Type, which we are referencing as DTYPE="$1" in 3 scripts.

Similarly, one can add 0x129af for Clear Time and add a reference (like CLEARTIME) in UpdateScript similar to DTYPE.

I added below changes to UpdateScript and its giving the clear time.


echo "Clear Time: " $CLEARTIME

And based on clear time, I am suppressing the Update Mail as below.

if [ "$CLEARTIME" ] && [ "$CLEARTIME" != "N/A" ]

echo "Not sending Update MAIL for Alarm Clear"
$MAIL -s "An alarm has been updated on $SERVER (Model Name=$MNAME)(Model Type=$MTYPE)" $RCVRS < /tmp/update_alarm.$PID