Page 1 of 1
Problem in Adding MIB file
Posted: Wed Jan 16, 2019 6:30 am
by bashar.abed
Hello Dear,
I am trying to add MIB file from Nagios xi command line using addmib command and i get no error but MIB file is not added to /usr/share/snmp/mibs and nothing defined in snmptt.conf file.
Please check why mib files is not added correctly.
Regards,
Re: Problem in Adding MIB file
Posted: Wed Jan 16, 2019 3:55 pm
by cdienger
Are you running the command as root? Can you provide a copy of the MIB? What are the permissions set to on the /usr/share/snmp/mibs directory?
Re: Problem in Adding MIB file
Posted: Thu Jan 17, 2019 2:33 am
by bashar.abed
Hello Dear,
I were using command under root user, you can find attached samples of MIBs I were trying to add.
below are the permissions set on /usr/share/snmp/mibs directory. Also you can check below the exact procedure used to add these MIBs.
Permissions:
drwxrwsr-x. 3 root nagios 20480 Jan 16 13:13 mibs
Procedure Used:
upload MIB to /tmp
change MIB file permissions to 777 using chmod
use addmib command as below
[root@nms tmp]# addmib acision-smi.mib
waiting your feedback...
BR,
Re: Problem in Adding MIB file
Posted: Thu Jan 17, 2019 4:41 pm
by tgriep
Couple of things, the addmib script does not copy the MIB file to the /usr/share/snmp/mibs folder.
You have to copy it there manually.
Another thing, Most MIB files include other MIB file in then so when you try to run the addmib program against a MIB file that does not have the IMPORTS MIB file, it will not add the entry to the snmptt.conf file.
The ACISION-SMI MIB requires this MIB file SNMPv2-SMI to be installed in the /usr/share/snmp/mibs folder.
The ACISION-MCO-AFG-MIB MIB requires these files
Code: Select all
ACISION-SMI
SNMPv2-SMI
ACISION-MCO-CONFIGURATION-MIB
SNMPv2-TC
Also, if an entry like the example below is in the snmptt.conf file, it has to be removed so the addmib program will import the file again.
Code: Select all
MIB: ACISION-SMI (file:ACISION-SMI.txt) converted on Wed Jan 16 10:53:29 2019 using snmpttconvertmib v1.4beta2
Re: Problem in Adding MIB file
Posted: Sun Jan 20, 2019 2:36 am
by bashar.abed
Hi Dear,
i checked SNMPv2-SMI and its already exist in directory /usr/share/snmp/mib.
i copied MIB file acision-smi to directory /usr/share/snmp/mib manually,changed permission to 777 and applied addmib command to the file with no errors. i checked snmptt file and the it seems MIB file is not added successfully, please check the snmptt file entry for acision-smi MIB file...
#
#
MIB: ACISION-SMI (file:./acision-smi.mib) converted on Sun Jan 20 09:29:03 2019 using snmpttconvertmib v1.3
[root@nms mibs]#
BR,
Re: Problem in Adding MIB file
Posted: Mon Jan 21, 2019 9:45 am
by tgriep
I checked the ACISION-SMI MIB file and it does not have any Trap or Notification objects defined in it so it will not add any entries to the snmptt.conf file.
The ACISION-MCO-AFG-MIB MIB file has some entries in it so run the addmib application against that file to add the snmptt configuration file.
Re: Problem in Adding MIB file
Posted: Tue Jan 22, 2019 1:34 am
by bashar.abed
Hi,
Many thanks for your response
the problem solved
Thanks
Re: Problem in Adding MIB file
Posted: Tue Jan 22, 2019 10:01 am
by tgriep
Glad to hear that it is fixed. I'll lock the post for you but feel free to open a new one in the future for any new questions.