Based on an issue we¹d opened with CA Support, I agree that Michael¹s method is the best. We found that for most alarms, even ones with dynamic titles, we could get the title from the first line of $PCAUSE... except eHealth alarms. Whatever magic is going on in the eHealth integration would cause its alarms to display dynamic titles in OneClick, but still have a standard $PCAUSE in Notifier. Support recommended something very similar to what Michael posted below and Lalit posted previously, which is working for us.
Jim On 7/28/10 2:29 PM, "Doyle, Michael" <[email protected]> wrote: > Lalit¹s code below only works on Windows. *NIX will not uppercase the variable > names, so on Windows it is called $SANM_0X12B4C and on *NIX it is > $SANM_0x12b4c. > > That is why I use the code I sent previously: > > # Windows > if [ "$SANM_0X12B4C" ]; then > ALARM_TITLE=`echo "$SANM_0X12B4C"` > ALARM_TYPE=`echo "$PCAUSE" | awk 'BEGIN{FS='\012'} (NR == 1){print $0}'` > # UNIX > elif [ "$SANM_0x12b4c" ]; then > ALARM_TITLE=`echo "$SANM_0x12b4c"` > ALARM_TYPE=`echo "$PCAUSE" | awk 'BEGIN{FS='\012'} (NR == 1){print $0}'` > else > ALARM_TITLE=`echo "$PCAUSE" | awk 'BEGIN{FS='\012'} (NR == 1){print $0}'` > ALARM_TYPE=$ALARM_TITLE > fi > > ALARM_TEXT=`echo "$PCAUSE" | awk 'BEGIN{FS='\012'} (NR != 1){print $0}'` > ALARM_TITLE_UC=`echo "$ALARM_TITLE" | tr '[:lower:]' '[:upper:]'` > > I use awk versus `echo $PCAUSE | head -1-` but it really doesn¹t matter. The > point is to check for either the upper case or lower case variable name and it > will work every time on every platform. > > > From: Lalit Tyagi [mailto:[email protected]] > Sent: Tuesday, July 27, 2010 5:10 PM > To: spectrum > Subject: RE: [spectrum] Alarm Title Variable > > Here is the configuration to get the alarm title for all types of alarms in > email: > > 1. Add 0x12b4c as EXTRA_ATTRS_AS_ENVVARS in .alarmrc file > > 2. Add ³ALARM_TITLE=$SANM_0X12B4C² in setscript and clear script > > 3. Add the following lines in the setscript and clearscript: > > > if [ ! "$ALARM_TITLE" ] > then > ALARM_TITLE=`echo $PCAUSE | head > -1-` > fi > > > From: Lalit Tyagi [mailto:[email protected]] > Sent: Thursday, July 22, 2010 2:16 PM > To: spectrum > Subject: RE: [spectrum] Alarm Title Variable > > That is not correct for all alarms > > Most of the alarms got their title from Pcasue file which is actually a ³Alarm > Type². Alarm title and Alarm type are always same unless spectrum variable > 76620 provide Alarm title value (e.g. ehealth Live exception alarms). > > If you pass any String in spectrum variable 76620 in Alertmap or EventDisp > then spectrum will use that string as a Alarm title and by pass Pcause header > value. > > We are using same logic as Emmanuael has mentioned for our most of the alarms. > For other types of alarm, we are using the variable 76620 as Description also > in EventFormat file and parsing the same Description in set script to get the > alarm title. > > -Lalit Tyagi > > > From: Emmanuel Oginni [mailto:[email protected]] > Sent: Thursday, July 22, 2010 11:29 AM > To: spectrum > Subject: RE: [spectrum] Alarm Title Variable > > > Hi, > Sorry that is wrong. The correct variable is gotten from result of the > command `head -1${SPECROOT}/custom/Events/CsPCause/Prob*${CAUSE}` > > > Best regards > Emmanuel Oginni > > Primus Telecommunications Canada Inc. > Phone:1-416-207-7066 > > > > > > From: Karpovitch, Sergei [mailto:[email protected]] > Sent: Thursday, July 22, 2010 11:19 AM > To: spectrum > Subject: [spectrum] Alarm Title Variable > Does anyone know what is the "Alarm Title Variable" that I can use in > SetScript to have an e-mail with subject looks something like this: > > MINOR ALARM: <DEVICE NAME> - AN EXCESSIVE RATE OF DEVICE INTERFACE > RECONFIGRATIONS > > where the Title of Alarm on the OneClick is " AN EXCESSIVE RATE OF DEVICE > INTERFACE RECONFIGRATIONS" > > at this time I have " $MAIL -s " $SEV alarm: $MNAME - $PCAUSE" $RCVRS < > /tmp/set_alarm.$PID", so I tried to use $PCAUSE, but then it will double > "SYMPTOMS: PROBABLE CAUSES: RECOMMENDED ACTIONS:" in e-mail. > > Does anyone have any other solutions? > > thanks in advance. > > Sergei Karpovitch > Senior Data Security Engineer > Morgan, Lewis & Bockius LLP > 1701 Market Street | Philadelphia, PA 19103-2921 > Direct: 215.963.5197 | Main: 215.963.5000 | Fax: 215.963.5001 > [email protected] | www.morganlewis.com > <http://www.morganlewis.com/> > DISCLAIMER > This e-mail message is intended only for the personal > use of the recipient(s) named above. This message may > be an attorney-client communication and as such privileged > and confidential. If you are not an intended recipient, > you may not review, copy or distribute this message. If > you have received this communication in error, please > notify us immediately by e-mail and delete the original > message. > * --To unsubscribe from spectrum, send email to [email protected] with the > body: unsubscribe spectrum [email protected] > > This electronic message contains information from Primus Telecommunications > Canada Inc. ("PRIMUS") , which may be legally privileged and confidential. The > information is intended to be for the use of the individual(s) or entity named > above. If you are not the intended recipient, be aware that any disclosure, > copying, distribution or use of the contents of this information is > prohibited. If you have received this electronic message in error, please > notify us by telephone or e-mail (to the number or address above) immediately. > Any views, opinions or advice expressed in this electronic message are not > necessarily the views, opinions or advice of PRIMUS. It is the responsibility > of the recipient to ensure that any attachments are virus free and PRIMUS > bears no responsibility for any loss or damage arising in any way from the use > thereof.The term "PRIMUS" includes its affiliates. > > > Pour la version en français de ce message, veuillez voir > http://www.primustel.ca/fr/legal/cs.htm > <http://www.primustel.ca/fr/legal/cs.htm> > * --To unsubscribe from spectrum, send email to [email protected] with the > body: unsubscribe spectrum [email protected] > > ---------------------------------------- > > This message is intended exclusively for the individual(s) or entity to > which it is addressed. It may contain information that is proprietary, > privileged or confidential or otherwise legally exempt from disclosure. > If you are not the named addressee, you are not authorized to read, > print, retain, copy or disseminate this message or any part of it. > If you have received this message in error, please notify the sender > immediately by e-mail and delete all copies of the message. > * --To unsubscribe from spectrum, send email to [email protected] with the > body: unsubscribe spectrum [email protected] > > ---------------------------------------- > > This message is intended exclusively for the individual(s) or entity to > which it is addressed. It may contain information that is proprietary, > privileged or confidential or otherwise legally exempt from disclosure. > If you are not the named addressee, you are not authorized to read, > print, retain, copy or disseminate this message or any part of it. > If you have received this message in error, please notify the sender > immediately by e-mail and delete all copies of the message. > * --To unsubscribe from spectrum, send email to [email protected] with the > body: unsubscribe spectrum [email protected] > * --To unsubscribe from spectrum, send email to [email protected] with the > body: unsubscribe spectrum [email protected] > --- To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum [email protected]
<<image.png>>
