From: Kálmán Szalai - KAMI Date: Thu, 30 Nov 2017 07:12:07 +0000 (+0100) Subject: Add support for LD_LIBRARY_PATH env variable in oracle_health ITL CheckCommand X-Git-Tag: v2.9.0~274^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=709d00fbdb257555debeb396b74f4e673ece852b;p=icinga2 Add support for LD_LIBRARY_PATH env variable in oracle_health ITL CheckCommand Signed-off-by: Michael Friedrich --- diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 80905236b..ba04e326a 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2306,8 +2306,9 @@ Environment Macros: Name | Description --------------------|------------------------------------------------------------------------------------------------------------------------------------------ -ORACLE_HOME | **Required.** Specifies the location of the oracle instant client libraries. Defaults to "/usr/lib/oracle/11.2/client64/lib". Can be overridden by setting "oracle_home". -TNS_ADMIN | **Required.** Specifies the location of the tnsnames.ora including the database connection strings. Defaults to "/etc/icinga2/plugin-configs". Can be overridden by setting "oracle_tns_admin". +ORACLE\_HOME | **Required.** Specifies the location of the oracle instant client libraries. Defaults to "/usr/lib/oracle/11.2/client64/lib". Can be overridden by setting the custom attribute `oracle_home`. +LD\_LIBRARY\_PATH | **Required.** Specifies the location of the oracle instant client libraries for the run-time shared library loader. Defaults to "/usr/lib/oracle/11.2/client64/lib". Can be overridden by setting the custom attribute `oracle_ld_library_path`. +TNS\_ADMIN | **Required.** Specifies the location of the tnsnames.ora including the database connection strings. Defaults to "/etc/icinga2/plugin-configs". Can be overridden by setting the custom attribute `oracle_tns_admin`. #### postgres diff --git a/itl/plugins-contrib.d/databases.conf b/itl/plugins-contrib.d/databases.conf index bb73a93ff..5b6208657 100644 --- a/itl/plugins-contrib.d/databases.conf +++ b/itl/plugins-contrib.d/databases.conf @@ -505,6 +505,7 @@ object CheckCommand "oracle_health" { env = { "ORACLE_HOME" = "$oracle_home$" + "LD_LIBRARY_PATH" = "$oracle_ld_library_path$" "TNS_ADMIN" = "$oracle_tns_admin$" } @@ -515,6 +516,7 @@ object CheckCommand "oracle_health" { 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 = SysconfDir + "/icinga2/plugin-configs" }