nv-l

Re: using a script in a ruleset.

1999-10-04 17:47:54
Subject: Re: using a script in a ruleset.
From: James Shanks <James_Shanks AT TIVOLI DOT COM>
To: nv-l AT lists.tivoli DOT com
Date: Mon, 4 Oct 1999 17:47:54 -0400
Before actionsvr executes your script he does and explicit set of all the
variables we have been discussing, so what you propose should work.  That's how
it is designed.

James Shanks
Tivoli (NetView for UNIX) L3 Support



Sean Aaron <sean.aaron AT UCOP DOT EDU> on 10/04/99 05:17:40 PM

Please respond to Discussion of IBM NetView and POLYCENTER Manager on NetView
      <NV-L AT UCSBVM.UCSB DOT EDU>

To:   NV-L AT UCSBVM.UCSB DOT EDU
cc:    (bcc: James Shanks/Tivoli Systems)
Subject:  Re: using a script in a ruleset.




James Shanks wrote:
>
> The trap variables will be parsed into environment variables which you can
> access in your script.  As for example, trap variable one will be accessible
as
> $NVATTR_1, var 2 as $NVATTR_2, and so on up to 50 or however many you have.
In
> addition such things as $NVA will give you the agent sending the trap and $NVE
> the enterprise id.  More information on these are given in the NetView
> Administrator's Guide, Chapter 5.      You can pass these or reference them
> internally.
>

I need a little more explicit clarification here.

It looks like I may need a script after all.  In it I would be taking
the result of a Query Database Collection and running it through an
action...are the variables going to be known to the script?  Say the
action is just "/usr/local/bin/notify" and notify consists of the
following:

#!/bin/sh

if [ $NVATTR_2 = blah ]
then
        mailx -s "blah is down!" lan.pager AT ucop DOT edu
fi

Would this work without my defining $NVATTR_2 in the script?  Is the
script being run as if it's issuing from a shell in which the Trap
variables are already defined?



--
Sean Aaron
UNIX System Administrator
University of California
Office of the President