Andy,
Here's a recent thread on the topic from some list regulars. --Mark S About two years ago I setup my notifer to pass the alarm title to my setscript. Can't remember how I got that working. I sure there a bunch of folks out there doing this. Thanks! Andy Stein DHTS Enterprise Network Services (Office) 919-681-2739 (Mobile) 919-402-7627 * --To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum ________________________________ Mark Serencha - Inforonics Global Services, LLC - (m) +1-781-439-0519 - Mark.Serencha_AT_inforonics.com From: Pfleger, Jim Sent: Thursday, July 29, 2010 9:21 AM To: spectrum Subject: Re: [spectrum] Alarm Title Variable 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" 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 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 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 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 ________________________________ From: Karpovitch, Sergei 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 --- To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum [email protected]
<<image001.png>>
