Hi Marcel & Alex,

Your solution was very helpful. The below lines work fine to get the Alarm
title alone from the PCAUSE.
================
VAR=$(echo $PCAUSE | awk -F"SYMP" '{print $1}')
echo " Alarm Title " $VAR
================
Regards,
Muhammed Udhuman. J

On Sun, Apr 17, 2011 at 2:41 AM, Marcel Schulte <
[email protected]> wrote:

> Hi Muhammed,
>
> per default this attribute (0x12b4c) is empty. OneClick shows
> AlarmType (I don't remember the attributeid) in this case. That's the
> first line of the PCause file.
>
> You could use this in your script:
>
> ***************
> ALARMTITLE=$SANM_0x12b4c
> [ -z "$ALARMTITLE" ] && ALARMTITLE=$(echo $PCAUSE | head -1)
> echo "Alarm Title: $ALARMTITLE"
> ***************
>
> The second line sets $ALAMTITLE to the first line of $PCAUSE if
> $ALAMTITLE is empty.
>
> This way you get the same as shown in OneClick in the AlarmTitle row.
>
> Regards,
> Marcel
>
> 2011/4/16 Muhammed Udhuman <[email protected]>:
> > Hi Alex,
> >
> > Please find below two methods which I used to get the Alarm Title. None
> of
> > them showing the value of the Alarm title. It returns blank.
> >
> > 1st Method:
> > .alarmrc
> >
> > USE_NEW_INTERFACE=true
> > EXTRA_ATTRS_AS_ENVVARS=0x12b4c
> > setscript
> > ALARMTITLE=$SANM_0x12b4c
> > echo "Alarm Title" $SANM_0X12B4C
> >
> >
> > 2nd Method:
> > .alarmrc
> > USE_NEW_INTERFACE=true
> > EXTRA_ATTRS_AS_ARGS=0x0023000e,0x11f7e,0x12b4c
> >
> > setscript
> > ALARMTITLE="$3"
> > echo "Alarm Title" $ALARMTITLE
> >
> >
> > Kinldy correct me if I did any mistakes in the script.
> > Thanks & Regards,
> > Muhammed Udhuman. J
> >
> > On Sat, Apr 16, 2011 at 3:50 PM, Alexander Maslobojev <[email protected]
> >
>  > wrote:
> >>
> >>  Hi Muhammed,
> >>
> >> please double check that your .alarmrc file has these two options
> >> included:
> >>
> >> ...........
> >> USE_NEW_INTERFACE=true
> >> EXTRA_ATTRS_AS_ENVVARS=0x12b4c
> >> ...........
> >>
> >> In the alarm script you can access this variable in this way:
> >>
> >> my $alarm_title = $ENV{SANM_0x12b4c};     # perl code
> >>
> >> Best regards,
> >> Alex.
> >>
> >>
> >> Am 16.04.2011 14:45, schrieb Muhammed Udhuman:
> >>
> >> Hi Alex,
> >>
> >> I used this attribute (0x12b4c) and nothing returned, its blank :(
> >>
> >> Regards,
> >> Muhammed Udhuman. J
> >>
> >> On Sat, Apr 16, 2011 at 3:08 PM, Alexander Maslobojev <
> [email protected]>
> >> wrote:
> >>>
> >>>    Hello Muhammed,
> >>>
> >>> the "Alarm title" attribute ID is 0x12b4c
> >>>
> >>> Regards,
> >>> Alex.
> >>>
> >>>
> >>> From: Muhammed Udhuman [mailto:[email protected]]
> >>> Sent: Samstag, 16. April 2011 13:03
> >>> To: spectrum
> >>> Subject: [spectrum] Attribute ID for Alarm Title
> >>>
> >>>
> >>>
> >>> Hi Team,
> >>>
> >>> I am using Spectrum 9.2 on win 2003. I need Alarm title in email
> >>> notification. $PCAUSE is giving alarm title but with symptioms,
> probable
> >>> cause and Action.
> >>>
> >>>
> >>>
> >>> Any one knows the Alarm title attribute ID, so that I can pass the
> >>> attribute alone and I can get only Alarm title in the email
> notification.
> >>>
> >>>
> >>>
> >>> Thanks & Regards,
> >>>
> >>> Muhammed Udhuman. J
> >>>
> >>>
> >>>
> >>> --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]

Reply via email to