Page 1 of 2
Failed to import SNMP MIB
Posted: Fri Sep 18, 2020 2:58 am
by mansonli
A MIB for checkpoint R80.30 is failed to import. Error message is shown in screenshot attached. MIB file is downloaded from
https://supportcenter.checkpoint.com/su ... eid=100604. It's also attached for analysis.
Re: Failed to import SNMP MIB
Posted: Fri Sep 18, 2020 2:35 pm
by tgriep
Login as root to the server to set the permissions of the folder where the MIBs are located in case they are not set correctly.
Code: Select all
chown nagios.nagios /usr/share/snmp/mibs
chmod 777 /usr/share/snmp/mibs
chown -R nagios.nagios /usr/share/snmp/mibs/*
chmod 664 /usr/share/snmp/mibs/*
chmod 777 /usr/share/snmp/mibs/processed_mibs
chown root:nagios /etc/snmp/snmptt.conf /etc/snmp
chown nagios:nagios /etc/snmp/snmptt.ini
chmod 664 /etc/snmp/snmptt.conf
chmod -R g+w /etc/snmp
Go back to the Manage MIBs menu and upload the MIB file and let us know if this works or not.
Re: Failed to import SNMP MIB
Posted: Mon Sep 21, 2020 4:35 am
by mansonli
MIB has been imported. Which configuration wizard can get all OIDs from this MIB? Tried SNMP configuration wizard but it only uses RFC1213-MIB to find services as shown in screenshot attached.
Checkpoint_R80.30_MIB Checkpoint_R80.30_MIB.txt apache apache rw-rw-r-- 2020-09-21 15:04:22
Re: Failed to import SNMP MIB
Posted: Mon Sep 21, 2020 9:15 am
by tgriep
When you run the SNMP Walk Wizard, put the following in the MIBs: field then the wizard will try and gather the OID's from the MIB file when it runs.
If the Wizard does not return anything specific to the MIB file, then the device does not respond to those OIDs so you would have to find another MIB file for your device.
Re: Failed to import SNMP MIB
Posted: Tue Sep 22, 2020 10:44 pm
by mansonli
There's error returned from command below. Original OID is .1.3.6.1.4.1.2620.1.6.7.2.4 which's used for monitoring Overall: procUsage. Does this error indicate OID is not defined in Checkpoint_R80.30_MIB?
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
check_xi_service_snmp! -p 161 -o enterprises.2620.1.6.7.2.4.0 -P 3 --seclevel=authPriv --secname=<user> --authproto=MD5 --authpasswd=<password> --privpasswd=<password> -x aes -m Checkpoint_R80.30_MIB
Re: Failed to import SNMP MIB
Posted: Wed Sep 23, 2020 12:01 pm
by tgriep
One thing to know, the name of the MIB does not have to match the name given to the file.
If you open the Checkpoint_R80.30_MIB.txt file you will see this at the top.
Code: Select all
CHECKPOINT-MIB DEFINITIONS ::= BEGIN
That shows you the name of the MIB is CHECKPOINT-MIB so your command needs to be adjusted to this.
Code: Select all
check_xi_service_snmp! -p 161 -o enterprises.2620.1.6.7.2.4.0 -P 3 --seclevel=authPriv --secname=<user> --authproto=MD5 --authpasswd=<password> --privpasswd=<password> -x aes -m CHECKPOINT-MIB
And another thing, if the username or passwords have a special character in it, enclose them in a single quotes.
Code: Select all
check_xi_service_snmp! -p 161 -o enterprises.2620.1.6.7.2.4.0 -P 3 --seclevel=authPriv --secname='user' --authproto=MD5 --authpasswd='password' --privpasswd='password' -x aes -m CHECKPOINT-MIB
If you still see an error, then the MIB file may be corrupted, run this to see if that is true. Adjust the name of the file as needed.
Code: Select all
snmptranslate -Tz -m /usr/share/snmp/mibs/Checkpoint_R80.30_MIB.txt
Re: Failed to import SNMP MIB
Posted: Mon Sep 28, 2020 8:37 am
by mansonli
OIDs can be found in file attached after running snmptranslate. Does it mean it's not corrupted?
Same error as below after running the following command
check_xi_service_snmp! -p 161 -o enterprises.2620.1.6.7.6.1.8 -P 3 --seclevel=authPriv --secname='MLI-RO' --authproto=MD5 --authpasswd='<password>' --privpasswd='<password>' -x aes -m CHECKPOINT-MIB!!!!!
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
Re: Failed to import SNMP MIB
Posted: Mon Sep 28, 2020 2:00 pm
by tgriep
Are you getting that error when you are using the Run Check Command button in the Core Config Manager?
If you save and Apply the Configuration to activate that check, do you see that error in the Service Status menu for that check?
Do you have any special characters in the passwords, if so, what are they?
Re: Failed to import SNMP MIB
Posted: Tue Sep 29, 2020 4:19 am
by mansonli
Special character contains in auth. and privileged password is & only which's single quoted. SNMP command which's used to perform check is shown in screenshot attached.
External command error: snmpget: Authentication failure (incorrect password, community or key) (Sub-id not found: (top) -> enterprises)
Re: Failed to import SNMP MIB
Posted: Tue Sep 29, 2020 10:13 am
by tgriep
I do not have the device you you are testing with but I created a SNMPv3 account and used the & character in the password and the commands did work in the XI interface.
To see if we can get an error on what is wring, you will have to run the check_snmp command from the command line with the verbose option.
-v, --verbose
Show details for command-line debugging
Code: Select all
/usr/local/nagios/libexec/check_snmp -H xxx.xxx.xxx.xxx -p 161 -o enterprises.2620.1.6.7.6.1.8 -P 3 --seclevel=authPriv --secname='user' --authproto=MD5 --authpasswd='password' --privpasswd='password' -x aes -m CHECKPOINT-MIB -v
I have a feeling there may be another MIB file that is corrupt and hopefully the above command will show it.