Patrick I understand using a script to get trap data out of a trap using
environment variables. The only way I know of to put data into the event window
would be to create a trap. Here is a PERL example I use and my data is
accurately displayed in the event window:
This example assumes $HOSTNAME is a valid NetView
hostname.
#
-------------------------------------------------------------------
# --- SubRoutine SendUpTrap
($USER) ---
#
-------------------------------------------------------------------
sub SendUpTrap
{
# $USER is a vpn concentrator connection/user name
# $STATE is either "Connected" or "Disconnected"
my $USER =
$_[0];
my $STATE =
$_[1];
$TRAP = "/usr/OV/bin/snmptrap
" . $HOSTNAME .
" .1.3.6.1.4.1.10000 \"\" 6
101 0 " .
".1.3.6.1.4.1.10000.1.1
octetstring \"VPN Event\" " .
".1.3.6.1.4.1.10000.1.2
octetstring \"$USER\" " .
".1.3.6.1.4.1.10000.1.3
octetstring \"$STATE\" ";
system "$TRAP" ;
}
In this example, $USER and $STATE appear in the event
viewer.
Resending..
-----Original
Message----- From:
Delaire, Patrick Sent: Tuesday, March 30, 2004 3:12 PM To: Nv-L
(nv-l AT lists.us.ibm DOT com) Subject: Placing data from script into netview event window
I am having problems getting variable data from a
script into the netview event window. Anyone on this list care to share some examples?
Thanks
Patrick
This e-mail may contain confidential or privileged information. If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately. Thank you. Aetna
|
|