SNMP-Trap-Tools(at)Work

SNMP-Trap-Tools(at)WorkTwo tools for testing SNMP notifications.

SNMP Trap Sender simulates a network device and sends traps. SNMP Trap Receiver accepts traps, names the notifications from MIB files and shows them in the browser. Both run on Rocky Linux 9 and are installed from a single installer file, with no internet access needed.

Sendersw-lab-01
Receiverrocky9-vm
TimeNotificationOIDVariables
10:33:24TRAPSIM-MIB::tsimReboot1.3.6.1.4.1.32473.1.1.0.2reason = operatorRequest, downtime = 5 s
10:33:29SNMPv2-MIB::coldStart1.3.6.1.6.3.1.1.5.1sysUpTime = 0
10:33:29TRAPSIM-MIB::tsimDeviceUp1.3.6.1.4.1.32473.1.1.0.3tsimDeviceName = sw-lab-01
A simulated reboot as it appears in the receiver: the warning, a cold start and the device back up.

SNMP Trap Receiver

2.1.0

Receives SNMP traps and informs from switches, routers, ESXi hosts and UPSs. Translates OIDs to names using MIB files, stores everything in log files and shows the notifications live in a web GUI in English or Norwegian.

Receives
SNMPv1 traps, v2c traps and informs, v3 traps and informs with noAuthNoPriv, authNoPriv and authPriv. UDP over IPv4 and IPv6.
Translates
Trap OIDs and variable names, using uploaded vendor MIBs and 25 built-in IETF MIBs. The MIBs are compiled offline.
Stores
A human-readable text log and a JSON Lines log, both with rotation.
Shows
A live list with filters, per-trap details, CSV export, receiver status, MIB management and log downloads.
~700/straps on one core
UDP 162inbound, configurable
TCP 8080web GUI
Read the technical description
The trap list. Click a row to see every variable with OID, name, value and type.

SNMP Trap Sender

1.1.0

Simulates a network device that sends notifications: heartbeat, reboot, interfaces going down and up, test messages and bursts for load testing. To one or more targets, in SNMP v1, v2c or v3.

Simulates
One device with a name, an agent address for SNMPv1, its own engine ID for SNMPv3 and a sysUpTime that restarts on reboot.
Events
Heartbeat, reboot, device up, interface down and up, test message, coldStart, warmStart, linkDown and linkUp.
Scenarios
Reboot with downtime, an interface going down and up, and a burst at a fixed rate. Can be cancelled along the way.
Schedules
Repeat an event at a given interval, for example a heartbeat every minute.
TRAPSIM-MIB
Its own MIB under enterprise 32473. Upload it to the receiver, and every simulated notification gets a name.
~1000/sv2c traps in a burst
VM or LXCProxmox too
46checks in the self-test
Read the technical description
The Targets tab: the receivers the simulated device sends to, in SNMP v1, v2c or v3.

Used together

The sender is built as the counterpart of the receiver. A reboot scenario produces the same sequence as a real device, so you can test rules and alarms on the receiver side.

  1. tsimReboot

    The sender announces that the device is restarting, with the reason and the expected downtime.

  2. Silent during the downtime

    Scheduled heartbeats pause. The receiver sees a gap in the heartbeat numbering.

  3. coldStart

    sysUpTime and the heartbeat number start from 0 again.

  4. tsimDeviceUp

    The device reports that it is up, with the reason and the actual downtime.

The receiver with TRAPSIM-MIB uploaded: every simulated notification is shown by name.

Installation

Each application ships as a self-contained installer with everything it needs. It verifies checksums, installs a hardened systemd service and runs a self-test at the end.

Receiver

$ sha256sum -c snmp-trap-receiver-offline-installer.run.sha256
$ sudo bash snmp-trap-receiver-offline-installer.run
# open http://<server>:8080/

Requires Rocky Linux 9, minimal installation included, with Python 3.9. Opens UDP 162 and TCP 8080 in firewalld.

Sender

$ sha256sum -c snmp-trap-sender-offline-installer.run.sha256
$ sudo bash snmp-trap-sender-offline-installer.run \
      --target <receiver-ip> --heartbeat 60
# upload TRAPSIM-MIB.mib to the receiver

Runs in a VM or a Proxmox LXC container. Without nesting in the container, the installer turns off the extra sandbox by itself.

Screenshots

Both user interfaces are available in English and Norwegian and also work on mobile. Pictures marked “Norwegian UI” show the Norwegian version of the same screen. Click to see a picture in full size.