nv-l
[Top] [All Lists]

Re: using a script in a ruleset.

To: nv-l@lists.tivoli.com
Subject: Re: using a script in a ruleset.
From: Sean Aaron <sean.aaron@UCOP.EDU>
Date: Mon, 4 Oct 1999 14:17:40 -0700
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@ucop.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


<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web