nv-l

Re: Passing NVA event Attribute to awk script ??

2000-05-10 16:40:38
Subject: Re: Passing NVA event Attribute to awk script ??
From: James_Shanks AT tivoli DOT com
To: nv-l AT lists.tivoli DOT com
Date: Wed, 10 May 2000 16:40:38 -0400
Rats.  I am too clumsy.  That should read
     echo $NVA  >>  /myfile
     echo $NVATTR_1 >> /myfile
     .....
     echo $NVATTR_n >> /myfile

so that you append to that file, other wise the only variable in it will be the
last one.

James Shanks
Tivoli (NetView for UNIX and NT) L3 Support


James_Shanks AT TIVOLI DOT COM on 05/10/2000 04:31:08 PM

Please respond to IBM NetView Discussion <nv-l AT tkg DOT com>

To:   IBM NetView Discussion <nv-l AT tkg DOT com>
cc:    (bcc: James Shanks/Tivoli Systems)
Subject:  Re: [NV-L] Passing NVA event Attribute to awk script ??






I'm confused here.  Sorry.
In a ruleset action node $NVA will resolve to the agent address, which should
resolve to a hostname.
But to get attribute number one, you use $NVATTR_1 not $1 like you do for trapd.

But I think your script is probably getting the variable correctly.
To prove that I would add this to it right at the beginning:
     echo $NVA  >  /myfile
     echo $NVATTR_1 > /myfile
     .....
     echo $NVATTR_n > /myfile

for however many you have and go look in myfile after it executes

James Shanks
Tivoli (NetView for UNIX and NT) L3 Support


_________________________________________________________________________

NV-L List information (unsubscribing, policies, posting, digest version,
searchable archives): http://www.tkg.com/nv-l