Skip to content

A Dockerized SNMP emulator useful for testing and development

License

Notifications You must be signed in to change notification settings

Cyberwatch/snmp-emulator

 
 

Repository files navigation

SNMP Emulator

A Dockerized SNMP emulator useful for testing and development.

This project is just the Python snmpsim package bundled up into a Docker image along with SNMP MIB walks, making it easy to deploy an emulator for testing SNMP consumers, such as Synse plugins.

Getting

git clone https://github.com/Cyberwatch/snmp-emulator
cd snmp-emulator
docker build -t snmp-emulator:latest .

Running

snmpsim is run within the container via the start_snmp_simulator.sh script. It provides some lightweight initial context logging to /logs/$3 and then kicks off the simulator with the following arguments:

--data-dir="$1"
--agent-udpv4-endpoint=0.0.0.0:$2
--v3-user=simulator
--v3-auth-key=auctoritas
--v3-auth-proto=$6
--v3-priv-key=privatus
--v3-priv-proto=$7

The --data-dir argument takes a value passed to the container. This should be the relative path to the .snmpwalk file that you want to load.

To configure the emulator to run with data from the Pxgms (Eaton) UPS, nulling out the log file:

$ docker run snmp-emulator:latest /snmp_data/device/ups/pxgms_ups/public.snmpwalk 1024 ../dev/null V3 authPriv SHA AES

The agent endpoint always uses the host 0.0.0.0 in order for the container to properly expose the endpoint.

About

A Dockerized SNMP emulator useful for testing and development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 68.3%
  • Dockerfile 20.0%
  • Groovy 11.7%