Unable to Upload a MIB

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Moneer81
Posts: 21
Joined: Mon Dec 07, 2015 2:55 pm

Unable to Upload a MIB

Post by Moneer81 »

Hello,

I am trying to upload a MIB file from the Nagios XI interface.

I am following the instructions in a Nagios document. The instructions ask me to go to Admin -> Manage MIBs and browse then upload my MIB. When I do that, I get the following error:
"MIB could not be installed - directory permissions may be incorrect."

I researched this issue and I saw another thread where the issue was the permissions. I checked the permissions on my server and here is what I have for the /usr/share/snmp/mibs directory:

drwxrwsr-x 2 root nagios 4096
Capture.JPG
I tried to modify the permissions and file ownership per this thread but to no avail:
https://support.nagios.com/forum/viewto ... =16&t=5786

Lastly, this is a trial environment. I am running Nagios XI 5 on a Windows box using VMWare Player. For a list of reasons, adding the MIB manually to that directory is a little difficult, since there is no easy way to copy the file from the Windows host to the VM.

Any help greatly appreciated.

Thanks,
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to Upload a MIB

Post by tgriep »

Can you run the following as root on the Nagios server and post the output here?

Code: Select all

ls -l /usr/share/snmp/
ls -l /usr/share/snmp/mibs
Be sure to check out our Knowledgebase for helpful articles and solutions!
Moneer81
Posts: 21
Joined: Mon Dec 07, 2015 2:55 pm

Re: Unable to Upload a MIB

Post by Moneer81 »

Thanks for offering to help!

Sure. I am not sure how much of the output you want to see. I am assuming you are most interested in the MIBs direcotry permissions. Here are the two screenshots from the two commands you asked me to run.
1.JPG
2.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unable to Upload a MIB

Post by Box293 »

Can you run this command please:

Code: Select all

chmod -R g+w /usr/share/snmp/mibs
Does this fix your problem?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Moneer81
Posts: 21
Joined: Mon Dec 07, 2015 2:55 pm

Re: Unable to Upload a MIB

Post by Moneer81 »

That was the first thing I tried before posting, but I will give it another try
Moneer81
Posts: 21
Joined: Mon Dec 07, 2015 2:55 pm

Re: Unable to Upload a MIB

Post by Moneer81 »

That did not seem to help. It is so strange. It doesn't even try to upload the mib. I just get the error message instantly. I am wondering if that is a limitation of the virtual image?
Moneer81
Posts: 21
Joined: Mon Dec 07, 2015 2:55 pm

Re: Unable to Upload a MIB

Post by Moneer81 »

Okay so I found a workaround. I was able to upload the mib file via SCP and drop it into the mib directory. For anyone who might find this useful one day, here is what I did from a client ubuntu machine:
-downloaded the mib to the desktop
-ran this command: scp "/home/moneer/Desktop/PowerNet-MIB.mib" [email protected]:"/usr/share/snmp/mibs"
(172.30.104.201 is the virtual machine's IP address that is currently running as my Nagios XI server)
Now if I browse to my MIBs directory, it is in there.

My final question is: do I need to tweak the permissions on this newly added MIB? Currently, it has the following permissions:
Capture.JPG
Should the permissions math the other files in that directory?

Thanks,
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to Upload a MIB

Post by rkennedy »

Thanks for letting us know!

Yes, they should match to ensure r privileges all around.

Can you post the output of ls -l /usr/share/snmp/ too?
Former Nagios Employee
Locked