| Author |
Messages |
|
psilva
  Posts:81
 |
| 04/13/2006 2:58 AM |
|
Hi, Can anyone tell me how to send and give an example of snmp trap, using the command snmptrap from windows server? Thanks Pedro |
|
|
|
chris.poole
  Posts:54
 |
| 04/17/2006 11:05 AM |
|
There are a number of snmptrap commands available, so syntax may not be the same. I have included examples for the most common one but I would suggest using awtrap which I have included at the end of this post...
Send an SNMP TRAP message to a host
Syntax: snmptrap [-d] -v 1 host community trap_type specific_type device_description [-a agent_addr]
snmptrap [-d] [-v 2] host noAuth trap_type specific_type device_description [-a agent_addr]
snmptrap [-d] [-v 2] host srcparty dstparty context trap_type specific_type device_description [-a agent_addr] Options: -a agent_addr Change the address that the trap reports it's being sent from. By default, snmptrap uses the sending host's address. -d Dump the output packet. -v 1|2 SNMP version (default is 2). community The community name for the transaction with the remote system. context The collection of object resources available to the dstparty. device_description A textual description of the device sending this trap. The description is used as the value of a system.sysDescr.0 variable. dstparty The name of the party performing the action. host An Internet address specified in dot notation or a host name. srcparty The name of the party requesting an action. specific_type An integer that specifies user-defined additional information about trap_type. trap_type An integer that specifies the type of trap message being sent. Trap types are defined in the table below.
If Unicenter Agents are installed on the server you want to send a trap from, use awtrap:
awtrap -h 1.2.3.4 66 1.2.3.4.5 -s "MY SNMP TRAP: Insert Your Real Message Here"
If agents are not installed you will probably need a third party trap generator, Try these open source utilities:
http://sourceforge.net/projects/net-snmp/
http://sourceforge.net/projects/sendtrap/
|
|
|
|
|