ok I made the change to the file and instead of the blank line that I was 
getting I'm now getting:


03/10/2009 11:17:29 - marsattacks - No Associated Text



---
Jon Whitehouse
Systems Engineer - IT, Server Support
MS 5221
1800 W. Center Street
Warsaw, IN 46580
(574) 371-8684
(574) 377-2829 (cell)
[email protected]

-----Original Message-----
From: Marcel Schulte [mailto:[email protected]] 
Sent: Thursday, March 05, 2009 2:47 PM
To: spectrum
Cc: spectrum
Subject: Re: [spectrum] Customizing SetScript for paging

Hi Jon, list,

there exist two different things for "Alarm Title". The attribute used
by you is kind of dynamic. "Normally" this attribute is not set. If so
OneClick uses the first line of the PCause file.

It may be that the first line of that file also exists as attribute
but I'm not at work so can't check it myself.

The ALARMTITLE variable can be set in SetScript like this:

***********
ALARMTITLE=`echo "$PCAUSE" | /usr/bin/head -1`
***********

Take this and set your AlarmTitle variable as follows:

***********
AlarmTitle=$SANM_0x12b4c
[ -z "$AlarmTitle" ] && AlarmTitle=`echo "$PCAUSE" | /usr/bin/head -1`
***********

The second line tests if value of variable AlarmTitle has zero length
and if so set AlarmTitle to the first line of the PCause file.

Hope this helps - feedback would be appreciated ;-)

BTW: I asked about these alarm titles some time ago, search for
'Difference between columns "Alarm Type" and "Alarm Title"' over the
list, this should yield all messages.

Regards,
Marcel


On Thu, Mar 5, 2009 at 8:15 PM, Jon Whitehouse
<[email protected]> wrote:
> All,
>
> I am wanting to customize my messages I get from Spectrum's
> AlarmNotifier/SANM.    I've been reading and re-reading the SetScript
> comments and playing around with it. I kind of got it working. I'm ALMOST
> there.. this is interesting.. According to the comments, There are two ways
> to allow specification of additional attributes. however for these to work
> the USE_NEW_INTERFACE=true must be set. (which I checked and it is in my
> .alarmrc)
>
> Next,  it states that for multi-line text or long attribute values to use
> the EXTRA_ATTRS_AS_ENVVARS. which I would think I would use because it can
> be a long line of text. cool so following that logic I went into the
> .alarmrc and added:
>
> EXTRA_ATTRS_AS_ENVVARS=0x12b4c
>
> (I pulled 0x12b4c from the "column-alarmtitle-config.xml" file since it
> appears it is read from there)
>
> Now in translating the comments it basically says that in order to "set" the
> value we have to use  $SANM_ before the attribute. cool. so it would be
> SANM_0x12b4c  and then it says to pass the values of these attributes
> reference like with either IFDESC=$SANM_xxx or IFALIAS=$SANM_xxx which tells
> me its just saying to call it a variable name and reference it so I go into
> my SetScript and added this line:
>
> AlarmTitle=$SANM_0x12b4c
>
> which means if I want to pass it, all I should have to do is pass the
> variable to my echo statement like this:
>
> echo "$DATE $TIME - $MNAME - $AlarmTitle"
>
> I kill off the alarmnotifier, let it restart, and get some alarms.  Here
> comes the really interesting thing. It Kind of works.. however the new
> problem is this:
>
> Some alarms are being sent correctly (ONLY those being passed from eHealth)
>
> 03/04/2009 17:35:37 - bunnykiller - The Page scan rate has been high for the
> past hour
>
> Those coming from native Spectrum monitoring (IE: MEMORY / MANAGEMENT AGENT
> LOST / etc) do not show a value
>
> 03/05/2009 04:42:35 - marsattacks -
>
> So the new question is this..  why? shouldn't the 0x12b4c pass the title?
>
>
> ---
> Jon Whitehouse
> Systems Engineer - IT, Server Support
> MS 5221
> 1800 W. Center Street
> Warsaw, IN 46580
> (574) 371-8684
> (574) 377-2829 (cell)
> [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]

---
To unsubscribe from spectrum, send email to [email protected] with the body: 
unsubscribe spectrum [email protected]

Reply via email to