Page 1 of 1
Multiple MIBS
Posted: Wed Jun 21, 2017 9:13 am
by naga.aripaka
Uploading MIB's in Nagios XI is straight forward. I believe it can be done in bulk in the nagios core just dropping all of them in mibs folder. But there is no quick way to convert them all. We have around 1000 MIB files which should be uploaded into Nagios and converted. Is there a better way to upload and convert them ?!
Re: Multiple MIBS
Posted: Wed Jun 21, 2017 11:16 am
by cdienger
Looking at
https://support.nagios.com/kb/article.php?id=73, there looks to be a way to do this from the command line. Can you share a MIB or two that you wish to import?
Re: Multiple MIBS
Posted: Wed Jun 21, 2017 1:05 pm
by naga.aripaka
Unfortunately, I cannot attach a MIB file. Can you download from this link below.
http://www.mibdepot.com/cgi-bin/mibvendors.cgi?id=1349
Re: Multiple MIBS
Posted: Wed Jun 21, 2017 3:51 pm
by naga.aripaka
I think I found the solution to that. I copy all the mib files to /usr/share/snmp/mibs and then run a small script to apply the command "addmib filename" (which processes the mib files on nagios core) on all the files in that directory. Correct me if I am wrong!
Re: Multiple MIBS
Posted: Wed Jun 21, 2017 4:03 pm
by cdienger
1. Create a new folder on the system. And move the MIB files to that folder.
2. Navigate to that folder and run:
Code: Select all
for i in *.txt; do addmib $i;done
Note that the command assumes the files all have the .txt extension. Modify this if need.
You may see the files added in /usr/share/snmp/mibs. If you don't, manually copy them over to that directory and set the permissions:
chown root:nagios *.txt
chmod 664 *.txt
Re: Multiple MIBS
Posted: Wed Jun 21, 2017 4:04 pm
by cdienger
Thanks for the input naga! Looks like our instructions are basically the same : )