Example on sending SNMP v1/v2c Traps

Introduction:

This explains an Example Agent that sends v1/v2c traps.

Overview:

This example explains the process of sending SNMP Version 1 and SNMP Version 2 traps with the help of WebNMS Agent Toolkit (Java Edition)'s API calls.

Source files:

Compilation:

1. Go to the directory,

   "<Installation Directory>\WebNMS\JavaAgent\examples\snmp\traps\simpletrap\agent\bin" to compile the source.

2. Compile the source by executing,

   sh compile.sh (for Linux users) OR
   compile (for Windows Users)

Starting the Example:

1. Go to "<Installation Directory>\WebNMS\JavaAgent\examples\snmp\traps\simpletrap\agent\bin" directory and execute,

   sh run.sh <options>(OR)
   run <options>

where, <options> specify the options in which you run the Agent.

Before starting the Agent, open three TrapViewers at localhost, ports 8003, 8004 & 8005 to listen for Traps. When the Agent is started, you will be receiving the Version 1 traps at 8003, Version 2 Notifications at 8004 and V3 Notifications at the port 8005 respectively.

AdventNet oval logo
Copyright (c) 2009 ZOHO Corp. All Rights Reserved.