Compiled SNMP MIBs for Python from LibreNMS
A comprehensive collection of 298 vendor MIB libraries compiled for use with PySNMP, sourced from the LibreNMS project's curated MIB repository. This project provides tools to compile, validate, and browse SNMP MIBs, plus pre-compiled distributions ready for immediate use.
The Python SNMP ecosystem has excellent libraries like PySNMP, easysnmp, and puresnmp, but developers consistently hit the same friction points:
- No centralized pre-compiled MIB distributions
- Manual compilation of vendor MIBs is tedious and error-prone
- Inconsistent success rates when compiling from various sources
- No easy way to explore and validate MIB collections
This project eliminates those roadblocks by providing battle-tested, pre-compiled MIBs and the complete toolchain to work with them.
Download and use immediately—no compilation required. Available in Releases with MIBs organized by vendor.
- lnmsc.py - Single vendor MIB compiler
- batch_compile_mibs.py - Batch compilation with detailed reporting
- check_mibs.py - Individual vendor validation
- batch_validate_mibs.py - Comprehensive validation with metrics
- pymibbrowser.py - GUI browser for exploring compiled MIBs
Validation success across top vendors by MIB count
Overall Statistics:
- Total Vendors: 298
- Total MIBs: 4,242
- Successfully Validated: 4,130 (97.36%)
- 100% Success Rate: 271 vendors
- 90%+ Success Rate: 27 vendors
Top Vendors by MIB Count:
| Vendor | Total MIBs | Success Rate |
|---|---|---|
| Cisco | 302 | 95.4% |
| Juniper (JunOS) | 226 | 100.0% |
| HP Comware | 205 | 100.0% |
| Nokia | 201 | 97.5% |
| Juniper (JunOSE) | 184 | 100.0% |
| Enterasys | 134 | 97.8% |
| Linksys | 108 | 98.1% |
| Transition | 93 | 86.0% |
| Ciena | 91 | 100.0% |
| D-Link | 88 | 98.9% |
All major firewall vendors achieve 100% validation success
- Fortinet: 43 MIBs (100%)
- WatchGuard: 15 MIBs (100%)
- Palo Alto: 8 MIBs (100%)
- SonicWALL: 3 MIBs (100%)
- Check Point: 1 MIB (100%)
Application delivery controllers with perfect validation rates
- F5: 9 MIBs (100%)
- Radware: 6 MIBs (100%)
- Citrix: 3 MIBs (100%)
- Kemp: 3 MIBs (100%)
- Array Networks: 1 MIB (100%)
See VALIDATION.md for complete results.
pip install pysmi pysnmp PyQt6- Python: 3.8+
- pysmi: MIB compilation
- pysnmp: MIB loading and manipulation
- PyQt6: Graphical MIB browser (optional)
- Download compiled MIBs from Releases
- Extract to your project directory
- Use with PySNMP:
from pysnmp.smi import builder
# Load Cisco MIBs
mib_builder = builder.MibBuilder()
mib_builder.add_mib_sources(builder.DirMibSource('./compiled_mibs/cisco'))
mib_builder.load_modules('CISCO-MEMORY-POOL-MIB', 'CISCO-PROCESS-MIB')
# Now use with SNMP queries...# Clone LibreNMS for source MIBs
git clone https://github.com/librenms/librenms.git
# Compile all vendors
python batch_compile_mibs.py --source librenms/mibs --output ./compiled_mibs --offline
# Validate compiled MIBs
python batch_validate_mibs.py --input ./compiled_mibs --markdown validation.md
PyQt6-based MIB browser showing hierarchical navigation and detailed object information
# Launch the MIB browser
python pymibbrowser.py
# Then: Load MIB Directory → select compiled_mibs/cisco
Exploring Juniper MIB objects with full OID paths and attribute details
Compile multiple vendor MIB directories:
# Compile all vendors
python batch_compile_mibs.py --source ./mibs --output ./compiled_mibs
# Compile specific vendors
python batch_compile_mibs.py --source ./mibs --output ./compiled_mibs \
--vendors cisco,juniper,arista,fortinet
# Compile and validate
python batch_compile_mibs.py --source ./mibs --output ./compiled_mibs --validate
# Offline mode (no network fallbacks)
python batch_compile_mibs.py --source ./mibs --output ./compiled_mibs --offlineValidate entire MIB collection:
# Validate all vendors
python batch_validate_mibs.py --input ./compiled_mibs
# Generate detailed reports
python batch_validate_mibs.py --input ./compiled_mibs \
--output validation_report.json \
--markdown VALIDATION.md
# Verbose output
python batch_validate_mibs.py --input ./compiled_mibs -v- Tree Navigation: Hierarchical view of MIB modules and symbols
- OID Display: Shows numeric OID paths alongside names
- Details Panel: Complete object information (syntax, access, status, description)
- Search: Real-time filtering by OID or name
- Error Logging: Track issues with specific MIBs
from pysnmp.hlapi import *
from pysnmp.smi import builder
# Setup MIB builder
mib_builder = builder.MibBuilder()
mib_builder.add_mib_sources(builder.DirMibSource('./compiled_mibs/cisco'))
# Perform SNMP GET
iterator = getCmd(
SnmpEngine(),
CommunityData('public'),
UdpTransportTarget(('192.168.1.1', 161)),
ContextData(),
ObjectType(ObjectIdentity('CISCO-MEMORY-POOL-MIB', 'ciscoMemoryPoolUsed', 1))
)
errorIndication, errorStatus, errorIndex, varBinds = next(iterator)
for varBind in varBinds:
print(' = '.join([x.prettyPrint() for x in varBind]))from easysnmp import Session
# Point to compiled MIBs
session = Session(
hostname='192.168.1.1',
community='public',
version=2,
use_numeric=False
)
# Query using MIB names
result = session.get('sysDescr.0')
print(f"{result.oid} = {result.value}")
Organized vendor directories ready for use
Cisco, Juniper, Arista, Dell, HP/HPE, Extreme Networks, Brocade, Allied Telesis, Enterasys, Nokia/Alcatel-Lucent
Aruba, Ruckus, Aerohive, Cambium, Ubiquiti, Mikrotik
Fortinet, Palo Alto Networks, Check Point, WatchGuard, SonicWALL, Barracuda
F5, Radware, Citrix, Kemp, Array Networks
Ciena, Adtran, Calix, Dasan, Transition Networks, RAD, Telco Systems
Dell/EqualLogic, NetApp, IBM, Synology, QNAP
APC, Eaton, Raritan, ServerTech, Geist
Moxa, Advantech, Phoenix Contact, Westermo
Total: 298 vendors across all categories
See VENDOR_LIST.md for the complete vendor list with statistics.
python-librenms-mibs/
├── lnmsc.py # Single vendor MIB compiler
├── batch_compile_mibs.py # Batch compilation tool
├── check_mibs.py # Single vendor validator
├── batch_validate_mibs.py # Batch validation tool
├── pymibbrowser.py # GUI MIB browser
├── README.md # This file
├── VALIDATION.md # Validation results
├── VENDOR_LIST.md # Complete vendor list
├── LICENSE # MIT License
├── screenshots/ # Documentation images
└── compiled_mibs/ # Pre-compiled MIBs (in releases)
├── cisco/
├── juniper/
├── arista/
└── ...
- Compilation: Some vendor MIBs have ASN.1 syntax issues and fail to compile (documented in reports)
- Validation: A few MIBs compile but fail PySNMP validation due to dependencies or advanced features
- Legacy Equipment: Older/obsolete vendor MIBs may have lower success rates
- Browser: Read-only tool for exploration—does not perform live SNMP queries
The pre-compiled distributions include only MIBs that successfully validated.
- License: MIT License
- Copyright: 2025 [Your Name/Handle]
- Tools and compilation scripts are MIT licensed
- Source: LibreNMS MIB Repository
- Copyright: Individual MIB files retain their original vendor copyrights
- License: MIBs are subject to their respective vendor license terms
- This is an independent project—not affiliated with or endorsed by LibreNMS
- LibreNMS has curated these MIBs over many years—full credit to their team
- Vendor MIB copyrights remain with original vendors (Cisco, Juniper, etc.)
- Users should review vendor licensing terms for commercial use
- Compiled Python modules (.py files) are derivatives of the original MIBs
- LibreNMS Team: For maintaining the comprehensive MIB repository
- PySNMP/pysmi: For the excellent Python SNMP implementation and MIB compiler
- PyQt: For the GUI framework
- All Vendors: For publishing their MIBs
Contributions welcome! Areas for improvement:
- Additional vendor MIB sources
- Improved compilation success rates
- MIB browser enhancements
- Integration examples
- Documentation improvements
Please ensure:
- Respect vendor MIB copyrights
- Document MIB sources clearly
- Run validation on any new MIBs
- Update documentation
- Issues: Use GitHub Issues for bugs or feature requests
- Discussions: Use GitHub Discussions for questions
- Updates: Watch releases for new compiled MIB versions
- Initial release
- 298 vendor collections
- 4,242 compiled MIBs
- 97.36% validation success
- Complete toolchain (compile, validate, browse)
- Pre-compiled distributions
- LibreNMS - Network monitoring system
- LibreNMS MIB Repository
- PySNMP Documentation
- pysmi Documentation
- RFC 3411-3418 - SNMP v3 specifications
Note: This project makes SNMP MIBs accessible to the Python community. For actual network monitoring with these MIBs, consider LibreNMS or other monitoring platforms.