ITL: Add query option to check_postgres

There were "query", "valtype" and "reverse" options missing
for "custom_query" action type in check_postgres plugin.

fixes #11205

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
Andres Ivanov 2016-02-23 09:44:30 +02:00 committed by Michael Friedrich
parent f5f0f7bd6e
commit 3df7336fb3
2 changed files with 15 additions and 0 deletions

View File

@ -1721,6 +1721,9 @@ postgres_standby | **Optional.** Assume that the server is in continious WAL
postgres_production | **Optional.** Assume that the server is in production mode if set to true. Defaults to false. postgres_production | **Optional.** Assume that the server is in production mode if set to true. Defaults to false.
postgres_action | **Required.** Determines the test executed. postgres_action | **Required.** Determines the test executed.
postgres_unixsocket | **Optional.** If "postgres_unixsocket" is set to true the unix socket is used instead of an address. Defaults to false. postgres_unixsocket | **Optional.** If "postgres_unixsocket" is set to true the unix socket is used instead of an address. Defaults to false.
postgres_query | **Optional.** Query for "custom_query" action.
postgres_valtype | **Optional.** Value type of query result for "custom_query".
postgres_reverse | **Optional.** If "postgres_reverse" is set, warning and critical values are reversed for "custom_query" action.
#### <a id="plugins-contrib-command-mongodb"></a> mongodb #### <a id="plugins-contrib-command-mongodb"></a> mongodb

View File

@ -296,6 +296,18 @@ object CheckCommand "postgres" {
value = "$postgres_action$" value = "$postgres_action$"
description = "determines the test executed" description = "determines the test executed"
} }
"--query" = {
value = "$postgres_query$"
description = "query for custom_query action"
}
"--valtype" = {
value = "$postgres_valtype$"
description = "determines the result type for custom_query action"
}
"--reverse" = {
set_if = "$postgres_reverse$"
description = "reverses warning and critical for custom_query action"
}
} }
vars.postgres_host = "$check_address$" vars.postgres_host = "$check_address$"