Page 2 of 2

Re: Failed to import SNMP MIB

Posted: Wed Sep 30, 2020 2:26 am
by mansonli
Output of snmp command with -v option is shown below.

/bin/snmpget -Le -t 1 -r 5 -m CHECKPOINT-MIB -v 3 [authpriv] 10.235.15.20:161 enterprises.2620.1.6.7.6.1.8
External command error: snmpget: Authentication failure (incorrect password, community or key) (Sub-id not found: (top) -> enterprises)

Besides, the following command is generated using Linux snmp wizard to check disk of checkpoint virtual appliance same as above command, what's the implication of error returned from it? What should be done to make it work normally?

check_xi_service_snmp_linux_storage! --login=<user> --passwd=<password> --privpass=<password> --protocols=md5,aes -m "^/$" -w 80 -c 95 -f

(Return code of 127 is out of bounds - plugin may be missing)

Re: Failed to import SNMP MIB

Posted: Wed Sep 30, 2020 9:00 am
by tgriep
I don't see any signs of a corrupt MIB file. It looks like the username or the password is not working so you will need to verify they are correct.

The check_xi_service_snmp_linux_storage command is using this plugin on the server.

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl
Make sure it exists and that is is executable by the Nagios user account.

Re: Failed to import SNMP MIB

Posted: Mon Oct 05, 2020 10:43 pm
by mansonli
Output of running the following command is shown. It has't run because some arguments are missing? Checked it has permission to execute it (logon user is root).
/usr/local/nagios/libexec/check_snmp_storage_wizard.pl --login=<username> --passwd='pwd' --privpass='pwd' --protocols=md5,aes -m "^/$" -w 70 -c 80 -f
Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]

-rwxrwxr-x 1 apache nagios 25539 Oct 18 2019 /usr/local/nagios/libexec/check_snmp_storage_wizard.pl

Re: Failed to import SNMP MIB

Posted: Tue Oct 06, 2020 9:05 am
by tgriep
The permissions for the plugin check_snmp_storage_wizard.pl look good and it can run without any errors.

The error could be caused by a special character in the username or password. If you have one, encase the username and password in single quotes ' so they will get passed correctly like the following example.

Code: Select all

check_xi_service_snmp_linux_storage! --login='user' --passwd='password' --privpass='password' --protocols=md5,aes -m "^/$" -w 80 -c 95 -f
If it fails, I will need to see a System Profile showing the settings.
To get your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it to the post or PM it to me.