TWiki Webs: Main TWiki Netview
Edit | Attach | Ref-By | Printable | Raw Text | Diffs | r1.1 | More
Content
Netview web home Register Changes Index Search

Go to topic

Change Password
Links
NetView global user group IBM NetView product page nv-l mailing list archive
A little gem from Leslie Clark on nv-l

I always put this little script in /usr/OV/reports/C:

#!/bin/ksh

# All_Events_For_Node.sh

# Show all events for a selected node from the trapd.log

name=$(basename $0)

. /usr/OV/bin/NVenvironment

. `echo $LOCAL_NV_COMMON_VARS`

xnmappmon -geometry 680x500 -commandTitle "$name" -commandHeading "All events from trapd.log for node: $OVwSelection1 " -cmd /showEvents.sh $OVwSelection1

Then I put this one in my custom scripts directory:

#!/bin/ksh

# showEvents.sh

# A script called from the Reports menu or the commandline to

# show all events for a node. This is simple enough that it could have been

# run directly from the Reports Menu stub script. Putting it here makes it

# easer to adapt it to the web client.

#set -x

NODE=$1

grep "$1 " /usr/OV/log/trapd.log* | cut -f2-20 -d: | sort

exit

The script in /usr/OV/reports/C shows up as a menu selection under Monitor..Reports..Site Provided for the selected node. The reason I make it two separate scripts is so I can call the same one (showEvents.sh) from the web client as well. I always ensure that the trapd daemon is configured to use the provided maintenance script and keep about 30 days of events and keep them in /usr/OV/log. If you have a trapd.old, then you have not done this. This allows for a number of older, renamed trapd.log files available for historical information. Try it. The result is a window of the entire event history for the selected node.

-- JaneCurry - 12 Feb 2004