Multiple MIBS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
naga.aripaka
Posts: 24
Joined: Fri Jun 16, 2017 12:31 pm

Multiple MIBS

Post 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 ?!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Multiple MIBS

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
naga.aripaka
Posts: 24
Joined: Fri Jun 16, 2017 12:31 pm

Re: Multiple MIBS

Post 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
naga.aripaka
Posts: 24
Joined: Fri Jun 16, 2017 12:31 pm

Re: Multiple MIBS

Post 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!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Multiple MIBS

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Multiple MIBS

Post by cdienger »

Thanks for the input naga! Looks like our instructions are basically the same : )
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked