Record and Replay Traps





The trap recorder records SNMP v1 and SNMP v2c traps by listening for traps at the specified port.  All the traps sent to the port will be recorded and displayed. The output of the Trap Recorder will give you the traps in the order they were received, with time stamps and the variables included in the trap PDU.


The recorded traps can be stored in XML files and replayed in the simulator as request-based, threshold-based or time-based traps.


Recording Traps in Trap Recorder

  1. Start the Trap Recorder by invoking SnmpTrapRecorder.bat/sh from <SimulatorHome>/bin directory.  

  2. Enter the following details in the UI.

  1. Click Add to add the port number to the trap list.

  2. Click Start. The Trap Recorder starts listening for traps and you can view the recorded traps.

Storing the Recorded Traps in XML Files


To store the recorded traps in XML files,

  1. Select Save option in the Trap Recorder dialog. This prompts a dialog to enter the file name.

  2. Enter the filename and click OK button. The file will be saved in XML format in <SimulatorHome>/rectraps directory.


  1. Traps duplicated will be recorded and displayed in the Trap recorder dialog but will not be saved in the XML file.

  2. The recorder saves the entries to a new file each time the Save option is selected. Hence, you cannot save entries to a file which already exists.

  3. SNMPv3 traps are not recorded.


Replaying Traps in Simulator


The recorded traps which are stored in XML files can be loaded in the trap configuration dialog of the SNMP Agent Simulator and Network Designer as request-based, threshold-based and timer-based traps.


To replay the recorded traps in SNMP agent simulator / Network designer,

  1. Start the SNMP Agent Simulator / Network Designer

  2. Invoke the Trap Configurations dialog by selecting Configure -> Traps option from the menu bar.  

  3. Select the trap type as request-based, threshold-based or timer-based from the icons displayed on the right-side. Click Add to configure traps The Trap Configuration wizard is displayed

  4. For request-based and threshold-based traps, browse and select the required scalar/columnar node from the MIB tree and click OK. The OID of the selected node will be displayed as the trap variable.

  5. Click Load to load the recorded trap configuration in this dialog.

  6. The Recorded Traps dialog displays all the recorded traps file. Selecting a file will display all the recorded trap entries in the file. Select a trap entry and click OK.

  7. The recorded trap configuration will be displayed in the Trap Configurations dialog. (i.e) the trap version, generic type, specific type, enterprise OID and variable bindings will be updated.

  8. Specify the other configurations and click OK to add the entry to the list.

Refer to Configuring Traps, to know more about configuring traps.

Copyright © 2012, ZOHO Corp. All Rights Reserved.
Network Monitoring Software from ManageEngine