From 709d00fbdb257555debeb396b74f4e673ece852b Mon Sep 17 00:00:00 2001 From: =?utf8?q?K=C3=A1lm=C3=A1n=20Szalai=20-=20KAMI?= Date: Thu, 30 Nov 2017 08:12:07 +0100 Subject: [PATCH] Add support for LD_LIBRARY_PATH env variable in oracle_health ITL CheckCommand Signed-off-by: Michael Friedrich --- doc/10-icinga-template-library.md | 5 +++-- itl/plugins-contrib.d/databases.conf | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) 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" } -- 2.40.0