(Fwd) Traps

John O'Grady (john@euristix.ie)
Thu, 12 Dec 1996 14:27:09 +0000

Hi,
I am trying to write to write Tcl scripts to
send traps from a Scotty agent to a Scotty manager. Ports 161 and 162
are not available to me as they are in use. An extract of the agent
script follows:

******************* Agent Script *******************

proc setup {} {
global t
global s

set localhost [exec hostname]

set s [snmp session -address $localhost -port 1701 -agent ""]

set t [snmp session -address $localhost -port 1752 -agent ""]

mib load cablespan.mib

}

proc trap1 {} {

global t

$t trap coldStart [list [ list sysDescr.0 "Fridge"]]

}

*************** End Agent Script *******************

So to generate a trap, I simply call the procedure "trap1"

The extract from the manager script is as follows:

******************* Manager Script *******************

## Procedure to set up a scotty manager
## Author: John O'Grady - 31/01/96
##
proc setup {} {

global s
global t

set localhost [exec hostname]

set s [snmp session -address $localhost -port 1701]

set t [snmp session -address $localhost -port 1752]

mib load cablespan.mib

}

## Main Part!
setup

******************* End Manager Script *******************

What I need to know is how does the Scotty manager become aware of
the trap? Should there be any output on the Scotty manager window?
The trap seems to be going out ok - ie no complaints from Scotty.
There is no evidence of the trap being generated at the manager end ,
however.
What do I need to do to be able to generate a trap at the agent end
and be able to view the trap details at the manager end?

Any sample code or pointers to where I might find information would
be greatly appreciated

Regards,

John O'Grady

-------------------------------------------------
John O'Grady
Euristix Limited
ph +353-1-2884788
Fax: +353-1-2885362

------------------------------------------------