Check_oracle_health

Hello to All,

i have a little Problem with check_oracle_health …

When I call the check: check_oracle_health on the command line with the following parameters:

/ usr / lib64 / nagios / plugins / check_oracle_health --connect test.host:1521/domain.name.lan --mode connected-users --password test - username test

does it work. As soon as I set it up over the Direcotor and unroll it terminates with exit code 128, but still displays a result.

On the web interface the correct result is displayed and additionally
<Terminated by signal 11 (Segmentation fault).>

and the check stays purple and unknown.

Maybe someone has a tip here.

Software used:

Icinga 2.10.4
Director latest version
oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
oracle-instantclient19.3-devel-19.3.0.0.0-1.x86_64.rpm
oracle-instantclient19.3-jdbc-19.3.0.0.0-1.x86_64.rpm
oracle-instantclient19.3-odbc-19.3.0.0.0-1.x86_64.rpm
check_oracle_health-3.1.2.2
DBD Oracle 1.76.tar.gz
perl DBI and perl-devel
System Software RedHat 7.6

Did you set the environment variables correctly? The ones that are defined in the command may not be correct for you.

        env = {
                "ORACLE_HOME" = "$oracle_home$"
                "LD_LIBRARY_PATH" = "$oracle_ld_library_path$"
                "TNS_ADMIN" = "$oracle_tns_admin$"
        }

        vars.oracle_health_regexp = false
        vars.oracle_health_ident = false
        vars.oracle_health_commit = false
        vars.oracle_health_noperfdata = false
        vars.oracle_health_report = "long"

        vars.oracle_home = "/usr/lib/oracle/11.2/client64/lib"
        vars.oracle_ld_library_path = "/usr/lib/oracle/11.2/client64/lib"
        vars.oracle_tns_admin = ConfigDir + "/plugin-configs"

Change them in your service

Or better in /etc/sysconfig/icinga2 or /etc/default/icinga2

1 Like

That won’t work, at least with the vars that I tested.
I added ORACLE_HOME, vars.oracle_home and oracle_home to /etc/sysconfig/icinga2 but it did not have affect on the check.