Skip to content

Repository files navigation

mibs.librenms.org

Static browser for every SNMP MIB shipped with LibreNMS, published at https://mibs.librenms.org.

Build locally

Requirements: uv, git, net-snmp (snmptranslate; Debian/Ubuntu apt install snmp, Arch pacman -S net-snmp).

scripts/build.sh                      # fetch LibreNMS into .cache/librenms and build ./site
scripts/build.sh --only 'cisco/*'     # build a subset
scripts/build.sh --object-pages 0     # skip the per-object pages (much faster)
python3 -m http.server -d site 8000   # preview
uv run pytest                         # tests

What the site holds

A page per MIB (the OID tree, types, descriptions, imports, traps, example values), a page per vendor, and a page for each of the most looked-up objects: the ones LibreNMS polls, every object of a standard MIB, then the rest in priority order up to objects.MAX_PAGES. The cap exists because the MIB pages and the search index already use about 700 MB of the 1 GB that GitHub Pages publishes; every build prints the total against that budget and where it goes. Each object page also answers at /oid/<its OID>/. Around those: /mibs/ and /vendors/ indexes, /oid/ for the OID tree's branches, /snmp/ for four explanatory guides, /about/, /stats/, /changes/ with an Atom feed at /feed.xml, and a sitemap index at /sitemap.xml over one sitemap per section.

How it works

Each MIB is parsed by the first tier that succeeds: pysmi → net-snmp snmptranslate → regex scrape → raw. Every MIB gets a page; the badge shows which tier was used and any parser messages are listed. Import aliases follow net-snmp's module_map (e.g. RFC-1213 → RFC1213-MIB). Vendors come from the IANA enterprise number of the MIB's root OID; the vendors people search for are named by vendors.ALIASES instead of by IANA's registered legal name, which keeps the page's URL stable when IANA edits an entry, and the old URL keeps working (see docs/redirects.md). Example values come from LibreNMS tests/snmpsim/*.snmprec. Search is a static, prefix-sharded JSON index under /data/search/. The sitemap's <lastmod> (and the page's dateModified) is the last git commit date of the MIB file, so the LibreNMS clone keeps its full history (without blobs); a shallow clone gives no dates.

External MIBs

extra-mibs/ holds public MIBs that LibreNMS MIBs import but LibreNMS does not ship. Refresh with uv run mibsite fetch-extra. Sources are listed in extra-mibs/SOURCES.md.

Redirects

GitHub Pages cannot return a 301, so a moved URL gets a stub page with a canonical link and an instant refresh, and every pair is listed in redirects.json. docs/redirects.md turns them into real 301s in Cloudflare.

Deployment

.github/workflows/build.yml builds on push to master, on manual dispatch and on a librenms-mibs-updated repository dispatch (sent by LibreNMS CI when its MIBs change), then deploys to GitHub Pages.

Contributors

Languages