snmpsim icon indicating copy to clipboard operation
snmpsim copied to clipboard

SNMPSim Custom Data with Type 99 and noSuchInstance Errors — Digital Twin in OpenNMS

Open Zaineb129 opened this issue 5 months ago • 1 comments
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:

  1. Is 99 a valid way to trigger a custom variation module in .snmprec? If not, what should I use?
  2. Why do I get noSuchInstance for OIDs that exist in the .snmprec?
  3. How should .snmprec entries be structured to call variate() in the variation module?
  4. Do I need to register the type or handler somewhere inside SNMPSim to use a new type like 99?

Zaineb129 avatar May 26 '25 01:05 Zaineb129

You might want to first read https://github.com/etingof/pysnmp/issues/429

lextm avatar May 26 '25 02:05 lextm