unable to import mibs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

unable to import mibs

Post by shakra2005 »

Hi Guys,

i want to import mib files in nagiosxi.

i go to admin/manage mibs/

then i select the file and select process trap too.

the following error occours

MIB could not be installed - directory permissions may be incorrect.

which permissions i must set
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: unable to import mibs

Post by abrist »

Try:

Code: Select all

chown -R root:nagios /usr/share/snmp/mibs
chmod -R g+w /usr/share/snmp/mibs
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: unable to import mibs

Post by shakra2005 »

now i have the following

Failed to converted mib path to snmptt.ini. (rc: 4)

/usr/share/snmp/mibs/.index are too large. count = 394

how must i fix it
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: unable to import mibs

Post by sreinhardt »

What other errors are you getting from running the addmib command? Could you post the entire output please.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: unable to import mibs

Post by shakra2005 »

Code: Select all

addmib /usr/share/snmp/mibs/3COM0115.MIB
This file looks like it has been added already!
Exiting.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: unable to import mibs

Post by sreinhardt »

So you are no longer receiving the index too large error? I would suggest attempting a mib that is not working, or has not been added as of yet.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
shakra2005
Posts: 70
Joined: Sun Aug 05, 2012 4:24 pm

Re: unable to import mibs

Post by shakra2005 »

the error i see at the following command

for i in 3COM*.mib; do snmpttconvertmib --in=/usr/share/snmp/mibs/$i --out=/etc/snmp/snmptt.conf --exec='/usr/share/snmp/snmpconf-data/snmptrapd-data/traphandle $r $s "$D"'; done

then this

add_mibdir: strings scanned in from /usr/share/snmp/mibs/.index are too large. count = 394

i would like to process the mib
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: unable to import mibs

Post by sreinhardt »

Let's have you tar the entire snmp/mibs directory and PM it to one of us.

Code: Select all

cd /tmp
tar cjf mibs.tar.bz2 /usr/share/snmp/mibs/
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
target74
Posts: 2
Joined: Mon Apr 28, 2014 3:07 am

Re: unable to import mibs

Post by target74 »

I'm a bit late, but maybe my infos are still useful to someone.

I had same strange error message a few days ago working with one of my clients.
Also, some mibs were not translated correctly despite mib files was there.

After 3 hysterical (for the client) days of hard job, I started to read source code of netsnmp and I discovered that the function which parse index files expects rows in a format like

MODULE{space}FILENAME{CR}

So , I discovered that my customer renamed a file using whitespaces (AAAURRGHH!!! ) which made function to stop analyzing index ( and thereby ignoring following mib modules ).
You may discover which file is causing issue looking at row number stated in "count = "
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: unable to import mibs

Post by slansing »

Ouch! But thank you for letting us know what your resolution was, I'm sure it will help someone in the future.
Locked