From 84def15ae897ad3d4fd058982540074efd6f8345 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 18 Mar 2016 15:10:37 +0100 Subject: [PATCH] Add --method parameter for check_{oracle,mysql,mssql}_health CheckCommands fixes #11098 --- doc/7-icinga-template-library.md | 3 +++ itl/plugins-contrib.d/databases.conf | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 5b5ac56ae..419933879 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -1667,6 +1667,7 @@ mssql_health_password | **Optional.** The password for the database c mssql_health_warning | **Optional.** The warning threshold depending on the mode. mssql_health_critical | **Optional.** The critical threshold depending on the mode. mssql_health_mode | **Required.** The mode uses predefined keywords for the different checks. For example "connection-time", "database-free" or "sql". +mssql_health_method | **Optional.** How the plugin should connect to the database (dbi for the perl module `DBD::Sybase` (default) and `sqlrelay` for the SQLRelay proxy). mssql_health_name | **Optional.** Depending on the mode this could be the database name or a SQL statement. mssql_health_name2 | **Optional.** If "mssql_health_name" is a sql statement, "mssql_health_name2" can be used to appear in the output and the performance data. mssql_health_regexp | **Optional.** If set to true, "mssql_health_name" will be interpreted as a regular expression. Defaults to false. @@ -1692,6 +1693,7 @@ mysql_health_database | **Optional.** The database to connect to. Def mysql_health_warning | **Optional.** The warning threshold depending on the mode. mysql_health_critical | **Optional.** The critical threshold depending on the mode. mysql_health_mode | **Required.** The mode uses predefined keywords for the different checks. For example "connection-time", "slave-lag" or "sql". +mysql_health_method | **Optional.** How the plugin should connect to the database (`dbi` for using DBD::Mysql (default), `mysql` for using the mysql-Tool). mysql_health_name | **Optional.** The SQL statement to be executed with "mysql_health_mode" sql. mysql_health_name2 | **Optional.** If "mysql_health_name" is a sql statement, "mysql_health_name2" can be used to appear in the output and the performance data. mysql_health_units | **Optional.** This is used for a better output of mode=sql and for specifying thresholds for mode=tablespace-free. Possible values are "%", "KB", "MB" and "GB". @@ -1712,6 +1714,7 @@ oracle_health_password | **Optional.** The password for the database c oracle_health_warning | **Optional.** The warning threshold depending on the mode. oracle_health_critical | **Optional.** The critical threshold depending on the mode. oracle_health_mode | **Required.** The mode uses predefined keywords for the different checks. For example "connection-time", "flash-recovery-area-usage" or "sql". +oracle_health_method | **Optional.** How the plugin should connect to the database (`dbi` for using DBD::Oracle (default), `sqlplus` for using the sqlplus-Tool). oracle_health_name | **Optional.** The tablespace, datafile, wait event, latch, enqueue depending on the mode or SQL statement to be executed with "oracle_health_mode" sql. oracle_health_name2 | **Optional.** If "oracle_health_name" is a sql statement, "oracle_health_name2" can be used to appear in the output and the performance data. oracle_health_regexp | **Optional.** If set to true, "oracle_health_name" will be interpreted as a regular expression. Defaults to false. diff --git a/itl/plugins-contrib.d/databases.conf b/itl/plugins-contrib.d/databases.conf index adf9a14a9..b80ee42d4 100644 --- a/itl/plugins-contrib.d/databases.conf +++ b/itl/plugins-contrib.d/databases.conf @@ -59,6 +59,10 @@ object CheckCommand "mssql_health" { value = "$mssql_health_mode$" description = "the mode of the plugin" } + "--method" = { + value = "$mssql_health_method$" + description = "how the plugin should connect to the database (dbi for using DBD::Sybase (default), sqlrelay for the SQLRelay proxy)" + } "--name" = { value = "$mssql_health_name$" description = "the name of the database etc depending on the mode" @@ -133,6 +137,10 @@ object CheckCommand "mysql_health" { value = "$mysql_health_mode$" description = "the mode of the plugin" } + "--method" = { + value = "$mysql_health_method$" + description = "how the plugin should connect to the database (dbi for using DBD::mysql (default), mysql for using the mysql-Tool)" + } "--name" = { value = "$mysql_health_name$" description = "currently only used for sql statements" @@ -184,6 +192,10 @@ object CheckCommand "oracle_health" { value = "$oracle_health_mode$" description = "the mode of the plugin" } + "--method" = { + value = "$oracle_health_method$" + description = "how the plugin should connect to the database (dbi for using DBD::Oracle (default), sqlplus for using the sqlplus-Tool)" + } "--name" = { value = "$oracle_health_name$" description = "the name of the tablespace, datafile, wait event, latch, enqueue, or sql statement depending on the mode"