Page 1 of 1

Unable to Upload a MIB

Posted: Mon Dec 07, 2015 4:47 pm
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,

Re: Unable to Upload a MIB

Posted: Mon Dec 07, 2015 5:02 pm
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

Re: Unable to Upload a MIB

Posted: Mon Dec 07, 2015 5:08 pm
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

Re: Unable to Upload a MIB

Posted: Mon Dec 07, 2015 7:43 pm
by Box293
Can you run this command please:

Code: Select all

chmod -R g+w /usr/share/snmp/mibs
Does this fix your problem?

Re: Unable to Upload a MIB

Posted: Tue Dec 08, 2015 8:06 am
by Moneer81
That was the first thing I tried before posting, but I will give it another try

Re: Unable to Upload a MIB

Posted: Tue Dec 08, 2015 8:20 am
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?

Re: Unable to Upload a MIB

Posted: Tue Dec 08, 2015 9:33 am
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,

Re: Unable to Upload a MIB

Posted: Tue Dec 08, 2015 4:07 pm
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?