Page 1 of 2

Unable to load cusotm MIB

Posted: Thu Jun 09, 2016 8:24 am
by nagiosuser1406
Hi,

when trying to load a custom MIB via the Web gui - i am getting the error message below:

MIB could not be installed - directory permissions may be incorrect

I have looked around the forum and found some suggestions to run the following

chown root:nagios /usr/share/snmp/mibs
chmod g+w /usr/share/snmp/mibs

Unfortunatly this has not solved the problem - does any one know of a fix ?

currently runing

NagiosXI v5.2.8

Thanks

Re: Unable to load cusotm MIB

Posted: Thu Jun 09, 2016 10:46 am
by rkennedy
What is the full output of these commands?

Code: Select all

ls -al /usr/share/snmp/
ls -al /usr/share/snmp/mibs/

Re: Unable to load cusotm MIB

Posted: Fri Jun 10, 2016 2:58 am
by nagiosuser1406
output below

[root@localhost tmp]# ls -al /usr/share/snmp/
total 296
drwxr-xr-x 5 root root 4096 Jun 9 08:49 .
drwxr-xr-x. 98 root root 4096 Jun 9 08:49 ..
-rw-r--r-- 1 root root 6678 May 11 00:40 mib2c.access_functions.conf
-rw-r--r-- 1 root root 37814 May 11 00:40 mib2c.array-user.conf
-rw-r--r-- 1 root root 4705 May 11 00:40 mib2c.check_values.conf
-rw-r--r-- 1 root root 2527 May 11 00:40 mib2c.check_values_local.conf
-rw-r--r-- 1 root root 393 May 11 00:40 mib2c.column_defines.conf
-rw-r--r-- 1 root root 664 May 11 00:40 mib2c.column_enums.conf
-rw-r--r-- 1 root root 806 May 11 00:40 mib2c.column_storage.conf
-rw-r--r-- 1 root root 12200 May 11 00:40 mib2c.conf
-rw-r--r-- 1 root root 28245 May 11 00:40 mib2c.container.conf
-rw-r--r-- 1 root root 3593 May 11 00:40 mib2c.create-dataset.conf
drwxr-xr-x 2 root root 4096 Jun 9 08:49 mib2c-data
-rw-r--r-- 1 root root 8164 May 11 00:40 mib2c.emulation.conf
-rw-r--r-- 1 root root 8498 May 11 00:40 mib2c.genhtml.conf
-rw-r--r-- 1 root root 3200 May 11 00:40 mib2c.int_watch.conf
-rw-r--r-- 1 root root 15279 May 11 00:40 mib2c.iterate_access.conf
-rw-r--r-- 1 root root 20913 May 11 00:40 mib2c.iterate.conf
-rw-r--r-- 1 root root 1014 May 11 00:40 mib2c.mfd.conf
-rw-r--r-- 1 root root 2139 May 11 00:40 mib2c.notify.conf
-rw-r--r-- 1 root root 9259 May 11 00:40 mib2c.old-api.conf
-rw-r--r-- 1 root root 8777 May 11 00:40 mib2c.perl.conf
-rw-r--r-- 1 root root 19507 May 11 00:40 mib2c.raw-table.conf
-rw-r--r-- 1 root root 7211 May 11 00:40 mib2c.row.conf
-rw-r--r-- 1 root root 4572 May 11 00:40 mib2c.scalar.conf
-rw-r--r-- 1 root root 20422 May 11 00:40 mib2c.table_data.conf
drwxrwsr-x 2 root nagios 4096 May 24 16:15 mibs
drwxr-xr-x 5 root root 4096 May 24 15:57 snmpconf-data
-rw-r--r-- 1 root root 145 May 11 00:40 snmp_perl.pl
-rw-r--r-- 1 root root 431 May 11 00:40 snmp_perl_trapd.pl


[root@localhost tmp]# ls -al /usr/share/snmp/mibs/
total 1804
drwxrwsr-x 2 root nagios 4096 May 24 16:15 .
drwxr-xr-x 5 root root 4096 Jun 9 08:49 ..
-rw-r--r-- 1 root nagios 17455 May 11 00:40 AGENTX-MIB.txt
-rw-r--r-- 1 root nagios 50948 May 11 00:40 BRIDGE-MIB.txt
-rw-r--r-- 1 root nagios 68104 May 11 00:40 DISMAN-EVENT-MIB.txt
-rw-r--r-- 1 root nagios 24613 May 11 00:40 DISMAN-SCHEDULE-MIB.txt
-rw-r--r-- 1 root nagios 64311 May 11 00:40 DISMAN-SCRIPT-MIB.txt
-rw-r--r-- 1 root nagios 84492 May 11 00:40 EtherLike-MIB.txt
-rw-r--r-- 1 root nagios 4660 May 11 00:40 HCNUM-TC.txt
-rw-r--r-- 1 root nagios 52544 May 11 00:40 HOST-RESOURCES-MIB.txt
-rw-r--r-- 1 root nagios 10583 May 11 00:40 HOST-RESOURCES-TYPES.txt
-rw-r--r-- 1 root nagios 4819 May 11 00:40 IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
-rw-r--r-- 1 root nagios 29665 May 11 00:40 IANAifType-MIB.txt
-rw-r--r-- 1 root nagios 4299 May 11 00:40 IANA-LANGUAGE-MIB.txt
-rw-r--r-- 1 root nagios 3513 May 11 00:40 IANA-RTPROTO-MIB.txt
-rw-r--r-- 1 root nagios 5066 May 11 00:40 IF-INVERTED-STACK-MIB.txt
-rw-r--r-- 1 root nagios 71691 May 11 00:40 IF-MIB.txt
-rw-r--r-- 1 root nagios 16782 May 11 00:40 INET-ADDRESS-MIB.txt
-rw-r--r-- 1 root nagios 46286 May 11 00:40 IP-FORWARD-MIB.txt
-rw-r--r-- 1 root nagios 185667 May 11 00:40 IP-MIB.txt
-rw-r--r-- 1 root nagios 15936 May 11 00:40 IPV6-ICMP-MIB.txt
-rw-r--r-- 1 root nagios 48703 May 11 00:40 IPV6-MIB.txt
-rw-r--r-- 1 root nagios 7257 May 11 00:40 IPV6-TCP-MIB.txt
-rw-r--r-- 1 root nagios 2367 May 11 00:40 IPV6-TC.txt
-rw-r--r-- 1 root nagios 4400 May 11 00:40 IPV6-UDP-MIB.txt
-rw-r--r-- 1 root nagios 5931 May 11 00:40 LM-SENSORS-MIB.txt
-rw-r--r-- 1 root nagios 42375 May 11 00:40 MTA-MIB.txt
-rw-r--r-- 1 root nagios 19760 May 24 16:15 NAGIOS-NOTIFY-MIB.txt
-rw-r--r-- 1 root nagios 2093 May 24 16:15 NAGIOS-ROOT-MIB.txt
-rw-r--r-- 1 root nagios 15901 May 11 00:40 NET-SNMP-AGENT-MIB.txt
-rw-r--r-- 1 root nagios 9160 May 11 00:40 NET-SNMP-EXAMPLES-MIB.txt
-rw-r--r-- 1 root nagios 9198 May 11 00:40 NET-SNMP-EXTEND-MIB.txt
-rw-r--r-- 1 root nagios 2036 May 11 00:40 NET-SNMP-MIB.txt
-rw-r--r-- 1 root nagios 3350 May 11 00:40 NET-SNMP-PASS-MIB.txt
-rw-r--r-- 1 root nagios 4686 May 11 00:40 NET-SNMP-TC.txt
-rw-r--r-- 1 root nagios 5039 May 11 00:40 NET-SNMP-VACM-MIB.txt
-rw-r--r-- 1 root nagios 21006 May 11 00:40 NETWORK-SERVICES-MIB.txt
-rw-r--r-- 1 root nagios 24694 May 11 00:40 NOTIFICATION-LOG-MIB.txt
-rw-r--r-- 1 root nagios 3067 May 11 00:40 RFC1155-SMI.txt
-rw-r--r-- 1 root nagios 79667 May 11 00:40 RFC1213-MIB.txt
-rw-r--r-- 1 root nagios 1174 May 11 00:40 RFC-1215.txt
-rw-r--r-- 1 root nagios 147822 May 11 00:40 RMON-MIB.txt
-rw-r--r-- 1 root nagios 45323 May 11 00:40 SCTP-MIB.txt
-rw-r--r-- 1 root nagios 4649 May 11 00:40 SMUX-MIB.txt
-rw-r--r-- 1 root nagios 15490 May 11 00:40 SNMP-COMMUNITY-MIB.txt
-rw-r--r-- 1 root nagios 22342 May 11 00:40 SNMP-FRAMEWORK-MIB.txt
-rw-r--r-- 1 root nagios 5496 May 11 00:40 SNMP-MPD-MIB.txt
-rw-r--r-- 1 root nagios 20014 May 11 00:40 SNMP-NOTIFICATION-MIB.txt
-rw-r--r-- 1 root nagios 9106 May 11 00:40 SNMP-PROXY-MIB.txt
-rw-r--r-- 1 root nagios 22769 May 11 00:40 SNMP-TARGET-MIB.txt
-rw-r--r-- 1 root nagios 39201 May 11 00:40 SNMP-USER-BASED-SM-MIB.txt
-rw-r--r-- 1 root nagios 2205 May 11 00:40 SNMP-USM-AES-MIB.txt
-rw-r--r-- 1 root nagios 21101 May 11 00:40 SNMP-USM-DH-OBJECTS-MIB.txt
-rw-r--r-- 1 root nagios 8263 May 11 00:40 SNMPv2-CONF.txt
-rw-r--r-- 1 root nagios 29305 May 11 00:40 SNMPv2-MIB.txt
-rw-r--r-- 1 root nagios 8924 May 11 00:40 SNMPv2-SMI.txt
-rw-r--r-- 1 root nagios 38034 May 11 00:40 SNMPv2-TC.txt
-rw-r--r-- 1 root nagios 5775 May 11 00:40 SNMPv2-TM.txt
-rw-r--r-- 1 root nagios 34162 May 11 00:40 SNMP-VIEW-BASED-ACM-MIB.txt
-rw-r--r-- 1 root nagios 28564 May 11 00:40 TCP-MIB.txt
-rw-r--r-- 1 root nagios 16418 May 11 00:40 TRANSPORT-ADDRESS-MIB.txt
-rw-r--r-- 1 root nagios 2163 May 11 00:40 UCD-DEMO-MIB.txt
-rw-r--r-- 1 root nagios 4402 May 11 00:40 UCD-DISKIO-MIB.txt
-rw-r--r-- 1 root nagios 3010 May 11 00:40 UCD-DLMOD-MIB.txt
-rw-r--r-- 1 root nagios 8118 May 11 00:40 UCD-IPFWACC-MIB.txt
-rw-r--r-- 1 root nagios 46150 May 11 00:40 UCD-SNMP-MIB.txt
-rw-r--r-- 1 root nagios 20882 May 11 00:40 UDP-MIB.txt

Thanks again

Re: Unable to load cusotm MIB

Posted: Fri Jun 10, 2016 11:57 am
by tgriep
Can you run the following commands and post the output?

Code: Select all

grep nag /etc/group
grep nag /etc/passwd
chage -l nagios

Re: Unable to load cusotm MIB

Posted: Mon Jun 13, 2016 3:42 am
by nagiosuser1406
please see below...

# grep nag /etc/group

nagios:x:500:nagios,apache,snmptt
nagcmd:x:501:nagios,apache,snmptt

grep nag /etc/passwd
nagios:x:500:500::/home/nagios:/bin/bash

chage -l nagios
Last password change : May 24, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7


Many thanks

Re: Unable to load cusotm MIB

Posted: Mon Jun 13, 2016 12:25 pm
by tgriep
Try changing the permissions to the following and see if that works for you.

Code: Select all

chmod -R  ugo+w /usr/share/snmp/mibs

Re: Unable to load cusotm MIB

Posted: Mon Jun 13, 2016 12:59 pm
by nagiosuser1406
unfortunately it still the same result when i attempt to upload a custom MIB :cry:

its also the same if i try to load a custom Plug in from the web GUI - i get the same message

Plugin could not be installed - directory permissions may be incorrect

Re: Unable to load cusotm MIB

Posted: Mon Jun 13, 2016 4:28 pm
by tgriep
Can you post the MIB file you are trying to upload and the /etc/php.ini file from the XI server?

Re: Unable to load cusotm MIB

Posted: Tue Jun 14, 2016 3:02 am
by nagiosuser1406
please see attahed ..
PowerNet-MIB.txt
The MIB attachment above is actually a .mib file extension - the forum does not allow upload of .mib file extensions
php.ini
many thanks

Re: Unable to load cusotm MIB

Posted: Tue Jun 14, 2016 10:12 am
by tgriep
Found it, it is the max upload size setting in the php.ini file
Edit the /etc/php.ini file and change this lime from

Code: Select all

upload_max_filesize = 2M
to

Code: Select all

upload_max_filesize = 20M
Save the file and run this to restart Apache.

Code: Select all

service httpd restart
This will allow you to upload files to the server with the max size of 20 Meg.
This should be large enough for most files, if not, you can increase it again.