snmpsim: SNMP Simulator is a tool that acts as multitude of SNMP Agents built into real physical devices, from SNMP Manager's point of view. Simulator builds and uses a database of physical devices' SNMP footprints to respond like their original counterparts do. · Pythie
SNMP Simulator is a tool that acts as multitude of SNMP Agents built into real physical devices, from SNMP Manager's point of view. Simulator builds and uses a database of physical devices' SNMP footprints to respond like their original counterparts do.
Low maintenance activity.Last release 7 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and issue handling.
Simulator maps query parameters like SNMP community names, SNMPv3 contexts or
IP addresses into data files.
You can immediately generate simulation data file by querying existing SNMP agent:
$ snmpsim-record-commands --agent-udpv4-endpoint=demo.pysnmp.com \
--output-file=./data/public.snmprec
SNMP version 2c, Community name: public
Querying UDP/IPv4 agent at 195.218.195.228:161
Agent response timeout: 3.00 secs, retries: 3
Sending initial GETNEXT request for 1.3.6 (stop at <end-of-mib>)....
OIDs dumped: 182, elapsed: 11.97 sec, rate: 7.00 OIDs/sec, errors: 0
Alternatively, you could build simulation data from a MIB file:
$ snmpsim-record-mibs --output-file=./data/public.snmprec \
--mib-module=IF-MIB
# MIB module: IF-MIB, from the beginning till the end
# Starting table IF-MIB::ifTable (1.3.6.1.2.1.2.2)
# Synthesizing row #1 of table 1.3.6.1.2.1.2.2.1
...
# Finished table 1.3.6.1.2.1.2.2.1 (10 rows)
# End of IF-MIB, 177 OID(s) dumped
Or even sniff on the wire, recover SNMP traffic there and build simulation
data from it.
Besides static files, SNMP simulator can be configured to call its plugin modules
for simulation data. We ship plugins to interface SQL and noSQL databases, file-based
key-value stores and other sources of information.
Besides stand-alone deployment described above, third-party
SNMP Simulator control plane
project offers REST API managed mass deployment of multiple snmpsim-command-responder
instances.
Documentation
Detailed information on SNMP simulator usage could be found at
snmpsim site.
Development
For local development, this repository includes helper scripts in the scripts/ directory:
python scripts/prepare.py [version] - Set up development environment with specified Python version
python scripts/build.py - Build the package
python scripts/tests.py [--coverage] - Run tests with optional coverage reporting
With uv, these scripts automatically handle virtual environment creation, dependency installation, and build processes.