How to display the probable cause in email subject line in CA spectrum

Document ID : KB000012234
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

How to display the probable cause in email subject line  in CA spectrum 

Example : Critical alarm (device IP: 1.1.1.1) (device Name: xyz)-Device not responding to polls 

Environment:
Windows platfrom
Answer:

First of all, add 0x12b4c (Dynamic Alarm Title attribute) into EXTRA_ATTRS_AS_ENVVARS parameter in .alarmrc

 

Then add the following lines before line 307 in the SetScript

 

--- from here ---

# Assign Dynamic or Static Alarm Title

if [ -n "$SANM_0x12b4c" ]

then

  ALARM_TITLE="$SANM_0x12b4c"

else

  ALARM_TITLE=`echo "$PCAUSE" | head -1`

fi

--- until here ---

 

On Windows you should capitalize the $SANM portion

 

--- from here ---

# Assign Dynamic or Static Alarm Title

if [ -n "$SANM_0x12B4C" ]

then

  ALARM_TITLE="$SANM_0x12B4C"

else

  ALARM_TITLE=`echo "$PCAUSE" | head -1`

fi

--- until here ---

 

And then you should modify the following line (currently line 316) in the SetScript

FROM

 

$MAIL -s "$SEV Alarm-(Device Name=$MNAME)(IPAddress=$IPADDRESS)-" $RCVRS < /tmp/set_alarm.$PID

 

TO

 

$MAIL -s "$SEV Alarm-(Device Name=$MNAME)(IPAddress=$IPADDRESS)- $ALARM_TITLE" $RCVRS < /tmp/set_alarm.$PID

 

Please restart AlarmNotifier.