If I understand you correctly, you want to send to TEC exactly what you
see in trapd.log or in the event window for the Cisco syslog trap. Is
that correct?
Then what you have to send is what is formatted for this event in
trapd.conf. If the Event Log Message (viewed with xnmtrap) for this trap,
just says something like, "$3", as is often the case with NetView traps,
then that is what you would send. But if it is something like "$E $G $S
args $# $*", then you have more work to do. There is no way you can get
trap to put that formatted string into a single variable for you -- you
have to build it. You would build a string of your own using those same
variables and send that. But I am not certain which of all these is fully
exported into your perl environment. Try referencing them in your script
. If you cannot reference them directly as $E or $*, then you would have
to pass them and reference as positional variables, as for example
<full-path>myscript $E $G $S $# "$*"
then you can reference them internally as $1, $2, $3, and $4.
Make sure that you enclose in quotes any passed variable containing spaces
or you won't get it all.
Hope this helps.
James Shanks
Level 3 Support for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group
Pablo Andrés Villegas Florez <pavillegas@epsa.com.co>
11/18/2002 03:21 PM
To: nv-l@lists.tivoli.com
cc:
Subject: [nv-l] SNMP Trap Parameters
Hi List,
Netview 6.03 W2K,
I need send some events (cisco syslog traps) to my TEC server, I made this
executing a perl script when the trap is received by the Netview Server,
but I cant send the trap description.
I send the agent-addr with the $A parameter and it work.
Anyone knows what is the trap description parameter ?
Thanks
Pablo A. Villegas
|