Re: [tkined] snmp traps

Cary B. O'Brien (cobrien@access.digex.net)
Tue, 27 Oct 1998 10:04:25 -0500 (EST)

> Hi,
>
> I am trying to write a script which sends snmp traps to another script which is
> listening to traps. In tnm/examples there is one for a snmptrapdaemon and
> that's ok. But I do not see any example, (maybe it is somewhere), on how to
> generate traps. Once again, on the Zeltserman-Puoplo book, they refer to Tnm
> 3.0 (which I do not have, and don't find) using ``snmp notifier''; but from
> what I see on the Tnm man pages ``snmp notifier'' is not supported by Tnm 2.1.
> Has anybody in this list some example to show me in order to put in place a
> send-catch traps mechanism?
>

You can generate a trap like this:

--------------------------- snip ------------------------

package require Tnm

set trap_ip <your target ip address>

puts "sending trap to $trap_ip"
set sn [snmp session -address $trap_ip -port 162]
$sn trap coldStart {}
$sn destroy

---------------------------- snip -----------------------

-- cary

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.