snmp_mib_archive icon indicating copy to clipboard operation
snmp_mib_archive copied to clipboard

MIB File Naming Convention

Open rrindels opened this issue 8 years ago • 6 comments

I believe it would be prudent to actually name the files consistently with the mibs. Vendors often name these things whatever they want, but it seems as if the NAME.mib pragma, or something similar would be prudent for a public repository.

for instance : 3fc-004.mib would become A3COM0004-GENERIC.mib. A simple scrubbing perl script could rename all of the artifacts in the entire repository in seconds.

Secondarily versioning of the mibs is also quite prudent as some vendor equipment only supports certain revisions of mibs and a strategy for merging those versions in should be considered potentially.

I have thousands of mibs to potentially share as well, but without reasonable structure and guidance I would be concerned about collisions , duplications, and reverts to older versions.

rrindels avatar Dec 17 '16 07:12 rrindels

I agree! Naming convention, versioning, and a by-vendor folder structure are all things I am trying to address soon (when I get the time).

hsnodgrass avatar Dec 17 '16 15:12 hsnodgrass

Subfolders may or may not be a good idea, I know netsnmp can have I indexing issues with a lot of mibs. And some idiot mibs use conflicting namespaces.

murrant avatar Dec 17 '16 15:12 murrant

So for my pull request: #9 I did this (looking at how Cisco was done):

<alphabet>/<vendor>/<platform>/<version>/<revision>/mibs.my

So for Palo Alto PAN-OS:

/p/Palo Alto/PAN-OS/6.0/RevD/mibs.my

If there are no Revisions, then that folder is omitted.

gortok avatar Aug 11 '17 17:08 gortok

I know this is about a year old thread, but throwing my two bits in here... I'm not sure if throwing versioning into the folder structure is going to work so well. I like keeping this repo in sync with my local ~/.snmp/mibs/ directory. Ideally, in my opinion, having the latest version for each MIB is a better way to handle it instead of trying to keep every version ever. Thoughts?

fuzzbawl avatar Sep 12 '18 19:09 fuzzbawl

@fuzzbawl I agree. I haven't given this repo much love, but I'd like to go through and move the versioned MIBs and only keep the latest ones. I was thinking of restructuring the repo to have a subdir in the main snmp_mib_archive called snmp_mib_archive that houses the latest repos in it's current structure. Another subdir could be called something like old_snmp_mib_archive and hold past versions of MIBs. That way, you could keep your MIB dir synced with the subdir, but all of the old versions would still be in the repo.

hsnodgrass avatar Nov 21 '18 22:11 hsnodgrass

Just a quick note that if you run the mibcopy tool on your repo, it should rename all the MIBs canonically and drop accidental dups.

etingof avatar Jan 16 '19 17:01 etingof