snmpsim
snmpsim copied to clipboard
SNMPSim Custom Data with Type 99 and noSuchInstance Errors — Digital Twin in OpenNMS
trafficstars
Hi everyone,
I’m building a Simple Network Digital Twin (SNDT) using SNMPSim, and I’m integrating it into OpenNMS. I’m using .snmprec files for simulation, but I want dynamic OID values. To achieve that, I’ve added a variation module and changed the type in .snmprec to 99, like this: 1.3.6.1.2.1.1.1.0|99|example
However, when I query these OIDs using snmpget, I get: noSuchInstance: No Such Instance currently exists at this OID
Context:
- I’m trying to trigger the variation module using a custom type (like 99)
- The module is structured correctly and its variate() function prints debug messages — but it seems like it’s never even called
- Static .snmprec lines (with normal types like 2 or 4) work fine
- My SNMPSim is running in Docker (v0.4.5), Python 3.10, pysnmp>=6.0.0
- I confirmed that the simulator runs and loads the variation module
What I want to know:
- Is 99 a valid way to trigger a custom variation module in .snmprec? If not, what should I use?
- Why do I get noSuchInstance for OIDs that exist in the .snmprec?
- How should .snmprec entries be structured to call variate() in the variation module?
- Do I need to register the type or handler somewhere inside SNMPSim to use a new type like 99?
You might want to first read https://github.com/etingof/pysnmp/issues/429