In this post, I will show you the easiest way to parse SNMP MIB files to generate a list of Devices and OID in CSV format. Recently, for one of the assignment, I was needing a list of NetApp OID’s and events to share with the team to schedule storage alerts.
There was no proper documentation available online, so I decided to write a step by step guide to achieve it. So that nobody else need to struggle like I did.
I will show you the whole procedure with the NetApp MIB file but the process will be applicable to all MIBs whether it is of Dell-EMC, Broadcom, Cisco or any vendor.
What is MIB
MIB stands for Management information base. It is a text file that describes Traps and SNMP Objects. The file contains entries in tree-structure (hierarchical) format and each entry is referenced as Object Identifier (OID). Each OID identifies a variable that can be read by using SNMP. Where SNMP stands for Simple Network Management Protocol.
For example, Below mentioned image shows NetApp MIB OIDs structure –
Requirements to Parse SNMP MIB browser
To parse SNMP MIB of any Technology vendor like Dell EMC, NetApp or HP. You would need these three things –
- SNMP MIB browser with capability to export it to CSV or XML
- SNMP MIB file from vendor support site
- Software to open the exported CSV file. e.g. MS excel or Open office calc.
Download free SNMP mib browser
To download free SNMP MIB browser, follow these simple steps –
Step1.1 – Visit ireasoning.com and Download SNMP MIB browser for free
- Open your favourite browser and visit ireasoning.com.
- Click on the “Download Now” button on the home page.
- Once you will reach the software download page. Click on “Download” against MIB browser free personal edition.
- Accept MIB browser license agreement (Personal edition)
The free personal edition offers limited features, but enough for our purpose of parsing MIB to CSV format. In case you want to explore all features of the MIB browser. You can download the Professional or Enterprise edition of the MIB browser. It’s free to evaluate for 30 days.
- Click on setup.exe for Windows and You will get this in your download folder.
How to Parse SNMP MIB Files to generate a list of Devices and OID
I am assuming that you have already downloaded the required MIB file and MIB browser software at this point.
In case you are looking for a NetApp MIB file, you can download it from the NetApp support website. You would need a NetApp username and password to log in. Else you can leave a comment, I will arrange it for you.
Follow along to parse SNMP MIB files to generate a list of OIDs –
Step2.1- Install free SNMP browser first
To read and parse MIB file to CSV, you need an SNMP browser. To install SNMP Browser, Double click on setup.exe, which you have downloaded in the last section.
Step2.2- Accept user access control permission
Select “Yes“, when it prompts to allow this app to make changes.
Step2.3- Accept End User License Agreement (EULA)
On this screen, just click “I Agree” to accept MIB browser license agreement.
Step2.4- Choose features of MIB Browser
Once you will accept the license agreement and you will reach on next screen. You will get the option to choose the components or features of the MIB browser you want to install.
There are two components available as shown in image –
- MIB Browser – It is a required or mandatory component. You can’t deselect it. Reason?? Don’t you want to install SNMP Browser? 😉
- Start Menu and Desktop Icon – Selecting this option will create Menu and Desktop shortcut icons for MIB browser software. So totally your choice, if you want to create these icons or not.
The space required to install SNMP Browser is approx. 130.6 MB. So make sure you have enough disk space available in your system.
I will suggest to keep both option selected and Hit Next button.
Step2.5- Choose Installation location for SNMP MIB Browser
On this screen, You need to select the installation location of the SNMP Browser. The default location would be “C:\Program files (x86)\ireasoning\mibbrowser\” as shown in the image. If you wish to select a custom location, Just <Click> on the Browse button and choose the different destination folder.
I will go with default installation directory.
Click Install.
Step2.6- Wait for SNMP MIB browser setup to complete
Now the installation of the SNMP MIB browser will start. It will take only a few minutes to complete. You can click on the show details button to check what all files are getting extracted.
Select Close button, once setup completes.
Step2.7- Launch MIB Browser
Once you will close setup wizard, it will ask you to “Launch MIB Browser“. Just Select “Yes“.
Step2.8- Extract your NetApp MIB files
All SNMP MIB files are always in Zip format. Once you download them from your vendor website. In the case of NetApp, it has two levels of compression.
For example, Once you will unzip the NetApp MIB file. It will have two more files, NetApp.mib.Z and traps.dat.Z inside. These are Unix compressed files.
You can download WinRAR software, in case you are unable to extract the “.Z” extension file in Windows 10.
So with reference to the image –
- First I extracted the NetApp_mib_2_13 zip file and I got two files inside it.
- I extracted NetApp.mib archive file
- Found NetApp.mib file, that is ready to upload to the browser.
Same process goes for traps.dat file, if you need it.
Step2.9- Load NetApp.mib file to SNMP Browser
Now switch to the SNMP Mib browser window. Select File > Load MIBs. Alternatively, you can press <Ctrl + L> on your keyboard.
Browse to the location, where you have extracted your SNMP MIB file. Select and It will Load the MIB file to the iReasoning MIB browser.
Step2.10- Validate the MIB modules
Once you will load the MIBs, just cross-check they are loaded as shown in the image. If not try again. Ignore the mgmt modules in the MIB tree. These are the default ones already present in the browser.
Step2.11- Export SNMP MIB to CSV
Now you just need to <Right click> on either NetApp or root of the MIB tree i.e. “iso.org.dod.internet” and choose the Export to CSV option.
Step2.12- Save the “.csv” file and open it with MS Excel
Save the CSV file with your preferred name. Then open it with MS excel.
Apply filter and select NetApp-MIB to see the list of devices and OIDs of NetApp MIB Modules. If you need this NetApp Mib CSV file, click here.
That all, we are done with procedure of parsing SNMP mib to csv format.
Video Tutorial
If you have any doubt while following this tutorial. Just check out this useful video on “How to parse SNMP Mib files to .csv“.
Summary
I hope you will find this tutorial useful and your struggle to convert MIB to CSV will end here. You can leave your comments, in case you have any difficulty parsing any MIB file. I will try my best to help you.
See you soon in the next post.. Till that time Happy Learning!!