Page 1 of 1
Oracle Serverspace Wizard bug on CentOS
Posted: Thu Aug 01, 2019 1:08 pm
by gzaloprgm
Hi. It seems as if the fix for TPS#14362 broke the wizard on CentOS. After upgrading the wizard most checks that used it return CRITICAL with the following error:
Code: Select all
install_driver(Oracle) failed: Cant load /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so for module DBD::Oracle: libclntsh.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
The new command definition does NOT work for CentOS, at least on 6.8 it fails with that error.
Code: Select all
define command {
command_name check_xi_oracleserverspace
command_line /bin/bash -c 'source /usr/local/nagiosxi/etc/configwizards/oracle/oracle' && $USER1$/check_oracle_health $ARG1$
}
Thanks,
Gonzalo
Re: Oracle Serverspace Wizard bug on CentOS
Posted: Fri Aug 02, 2019 9:43 am
by gzaloprgm
The same bug applies to all three oracle wizards:
Code: Select all
/usr/local/nagiosxi/html/includes/configwizards/oracle_query/templates/oraclequery.cfg
/usr/local/nagiosxi/html/includes/configwizards/oracle_tablespace/templates/oracletablespace.cfg
/usr/local/nagiosxi/html/includes/configwizards/oracle_serverspace/templates/oracleserverspace.cfg
Thanks
Re: Oracle Serverspace Wizard bug on CentOS
Posted: Fri Aug 02, 2019 12:58 pm
by jomann
Hello,
This was a change made for Ubuntu systems but I suspect it's because the single quote does not encompass the actual check section. Can you try with the following command (edit it in the ccm for check_oraclex) any one should do:
Code: Select all
/bin/bash -c 'source /usr/local/nagiosxi/etc/configwizards/oracle/oracle && $USER1$/check_oracle_health $ARG1$'
Testing it here too and will get this out once it's fixed.
Re: Oracle Serverspace Wizard bug on CentOS
Posted: Wed Aug 07, 2019 8:57 am
by gzaloprgm
jomann wrote:
Code: Select all
/bin/bash -c 'source /usr/local/nagiosxi/etc/configwizards/oracle/oracle && $USER1$/check_oracle_health $ARG1$'
Unfortunately this fix will cause other issues, since $ARG1$ can contain single quotes and they will not work properly when using this command.
It can't be fixed by replacing single with double quotes on the command definition because $ARG1$ can also contain double quotes (for instance when using the query wizard, they will be used for the query itself - name argument).
Thanks, Gonzalo
Re: Oracle Serverspace Wizard bug on CentOS
Posted: Thu Aug 08, 2019 4:04 pm
by jomann
Sorry about the confusion, I checked into this, you're right, and looking into this further it looks like this change to using /bin/bash in the check command was unnecessary and that the . syntax works fine in place of source, even on Ubuntu, so the command should be something like this:
Code: Select all
. /usr/local/nagiosxi/etc/configwizards/oracle/oracle && $USER1$/check_oracle_health $ARG1$
Will have this tested and verified on the other systems as well.