I am trying to write a script that will perform GET/SET commands on my device. While I have tried to do GET action on sysDescr (which is part of the standard MIB SNMPv2) I managed to get a response. I have tried to use the mibdump.py script in several different ways, in order to convert my proprietary MIB files so that I could later on work with them:
activate the mibdump.py on a specific MIB file (see the result) with .mib extension and without
c:\Program Files\Python35\Scripts>python mibdump.py SL-XPDR.mib Source MIB repositories: file:///usr/share/snmp/mibs, h ttp://mibs.snmplabs.com/a sn1/@mib@ Borrow missing/failed MIBs from: h ttp://mibs.snmplabs.com/pysnmp/notexts/@mib@ Existing/compiled MIB locations: pysnmp.smi.mibs, pysnmp_mibs Compiled MIBs destination directory: C:\Users\alpha_2.PL\PySNMP Configuration\mibs MIBs excluded from code generation: RFC-1212, RFC-1215, RFC1065-SMI, RFC1155-SMI , RFC1158-MIB, RFC1213-MIB, SNMP-FRAMEWORK-MIB, SNMP-TARGET-MIB, SNMPv2-CONF, SN MPv2-SMI, SNMPv2-TC, SNMPv2-TM, TRANSPORT-ADDRESS-MIB MIBs to compile: SL-XPDR Destination format: pysnmp Parser grammar cache directory: not used Also compile all relevant MIBs: yes Rebuild MIBs regardless of age: no Do not create/update MIBs: no Byte-compile Python modules: yes (optimization level 0) Ignore compilation errors: no Generate OID->MIB index: no Generate texts in MIBs: no Try various filenames while searching for MIB module: yes Created/updated MIBs: Pre-compiled MIBs borrowed: Up to date MIBs: Missing source MIBs: SL-XPDR Ignored MIBs: Failed MIBs:
I have tried again with specific MIB file location with no success
I have even tried to compile the whole MIB folder without any success
c:\Program Files\Python35\Scripts>python mibdump.py C:\Program Files\Python35\Scripts\mibs Source MIB repositories: file:///usr/share/snmp/mibs, file://C:\, file://c:\Prog ram Files\Python35\Scripts\Files\Python35\Scripts, h ttp://mibs.snmplabs.com/asn1/@mib@ Borrow missing/failed MIBs from: h ttp://mibs.snmplabs.com/pysnmp/notexts/@mib@ Existing/compiled MIB locations: pysnmp.smi.mibs, pysnmp_mibs Compiled MIBs destination directory: C:\Users\alpha_2.PL\PySNMP Configuration\mibs MIBs excluded from code generation: RFC-1212, RFC-1215, RFC1065-SMI, RFC1155-SMI, RFC1158-MIB, RFC1213-MIB, SNMP-FRAMEWORK-MIB, SNMP-TARGET-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, TRANSPORT-ADDRESS-MIB MIBs to compile: Program, mibs Destination format: pysnmp Parser grammar cache directory: not used Also compile all relevant MIBs: yes Rebuild MIBs regardless of age: no Do not create/update MIBs: no Byte-compile Python modules: yes (optimization level 0) Ignore compilation errors: no Generate OID->MIB index: no Generate texts in MIBs: no Try various filenames while searching for MIB module: yes Created/updated MIBs: Pre-compiled MIBs borrowed: Up to date MIBs: Missing source MIBs: Program, mibs Ignored MIBs: Failed MIBs:
What is the right way to transform my proprietary MIB files into .py files ?