nv-l
[Top] [All Lists]

Re: enviornment variables set by the Action node

To: nv-l@lists.tivoli.com
Subject: Re: enviornment variables set by the Action node
From: Ray Schafer <schafer@TKG.COM>
Date: Thu, 7 Jan 1999 13:19:37 -0500
Reply-to: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Sender: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Denny Whelan wrote:
>
> Is there a list of the environment variable set by the action node.  I am
> particularly interested in accessing the severity the of an event from a
> script that is executed by an action node.

My understanding is that the severity of the event is not available in
the environment until NV release 5.2.  For now, here is what I do:
# Severity array
SEVERITY[0]=HARMLESS
SEVERITY[1]=UNKNOWN
SEVERITY[2]=WARNING
SEVERITY[3]=MINOR
SEVERITY[4]=CRITICAL
SEVERITY[5]=FATAL

LINE=$(grep -w "{${NVE}} $NVG $NVS" /usr/OV/conf/C/trapd.conf)
[[ -z "$LINE" ]] && LINE=$(grep -w "{${NVE%.*}} $NVG $NVS"
/usr/OV/conf/C/trapd.conf)
if [[ -n "$LINE" ]]
then
        set $LINE
        integer SEVID=$6
else
        SEVID=1  # UNKNOWN
fi

# to print the severity out use ${SEVERITY[$SEVID]}

--
Ray Schafer                   | schafer@tkg.com
The Kernel Group              | Network Computing Consulting

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

Archive operated by Skills 1st Ltd

See also: The NetView Web