I think that parsing the message is the best thing to do. We faced the same
problem on a different NetView event a couple of months ago, and found that
all of the NetView "internal" events just put the message test in $V3. So
what we did was to parse $V3 for the word that we were looking for. Here's
a code snippet in Korn shell that we use, that someone posted to this list
several months ago:
set -A ARRAY $3
NEWVAR=`print ${ARRAY[2]}`
The first line parses the contents of $3 into an array variable $ARRAY. The
second line stores the third word into $NEWVAR.
HTH
Joel Gerber - I/T Networking Professional - USAA Information Technology Co.
- San Antonio, TX
* (210)456-4231 * mailto:Joel.Gerber@USAA.com "
http://www.usaa.com
-----Original Message-----
From: Frantsen Christian [SMTP:cf@internoc.se]
Sent: Tuesday, April 18, 2000 08:36
To: 'nv-l@tkg.com'
Subject: [NV-L] Inteface Down
Hi!
I started wrinting a new TEC Rule for Interface down events (OV_IF_Down)
today when I noticed something,
it seems that there are no netview variable avaliable with the interface
name that becomes unavailable. ($V1, $V2 etc)
or I'm simply blind =)
Since I can recieve several IF Down from a router I need to have a uniqe
idenifier for each event, that i can use later
in my rule processing to find it.
The only way i thought of so far is to parse the msg field and get the
interface name from there, then set a slot value of my own in
the tec-rule. Should I have to do this or is there a simpler way of getting
that interface name from netview?
<--------------[ Internoc Scandinavia AB ]-->
Christian Frantsen - Technical Operations
Tel: +46-36-194650 -o)
Fax: +46-36-194651 /\\
http://www.internoc.se _\_V
<------------------------------------------->
_________________________________________________________________________
NV-L List information (unsubscribing, policies, posting, digest version,
searchable archives): http://www.tkg.com/nv-l
|