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
|