Oracle Serverspace Wizard bug on CentOS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gzaloprgm
Posts: 33
Joined: Mon Aug 06, 2018 8:46 am
Contact:

Oracle Serverspace Wizard bug on CentOS

Post 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
gzaloprgm
Posts: 33
Joined: Mon Aug 06, 2018 8:46 am
Contact:

Re: Oracle Serverspace Wizard bug on CentOS

Post 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
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Oracle Serverspace Wizard bug on CentOS

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gzaloprgm
Posts: 33
Joined: Mon Aug 06, 2018 8:46 am
Contact:

Re: Oracle Serverspace Wizard bug on CentOS

Post 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
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Oracle Serverspace Wizard bug on CentOS

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked