From: Michael Friedrich Date: Thu, 22 May 2014 19:06:19 +0000 (+0200) Subject: Fix nrpe command definition. X-Git-Tag: v2.0.0-beta1~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60b772334d0d22e7f505a2c2f67f2e77171af455;p=icinga2 Fix nrpe command definition. Refs ##6225 --- diff --git a/doc/5-configuring-icinga-2.md b/doc/5-configuring-icinga-2.md index 25691b098..1791755c0 100644 --- a/doc/5-configuring-icinga-2.md +++ b/doc/5-configuring-icinga-2.md @@ -1981,10 +1981,9 @@ Name | Description nrpe_address | **Optional.** The host's address. Defaults to "$address$". nrpe_port | **Optional.** The NRPE port. Defaults to 5668. nrpe_command | **Optional.** The command that should be executed. -nrpe_no_ssl | **Optional.** Whether to disable SSL or not. -nrpe_timeout_unknown | **Optional.** Whether to set timeouts to unknown instead of critical state. +nrpe_no_ssl | **Optional.** Whether to disable SSL or not. Defaults to `false`. +nrpe_timeout_unknown | **Optional.** Whether to set timeouts to unknown instead of critical state. Defaults to `false`. nrpe_timeout | **Optional.** The timeout in seconds. -nrpe_arguments | **Optional.** Optional nrpe arguments (must be enabled on the NRPE client). #### apt diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index e6d16d79a..b57048092 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -353,30 +353,27 @@ object CheckCommand "by_ssh" { } object CheckCommand "nrpe" { - import "plugin-check-command" + import "plugin-check-command" - command = PluginDir + "/check_nrpe" + command = PluginDir + "/check_nrpe" - arguments = { - "-H" = "$nrpe_address$" - "-p" = "$nrpe_port$" - "-c" = "$nrpe_command$" - "-n" = { - set_if = "$nrpe_no_ssl$" + arguments = { + "-H" = "$nrpe_address$" + "-p" = "$nrpe_port$" + "-c" = "$nrpe_command$" + "-n" = { + set_if = "$nrpe_no_ssl$" description = "Do not use SSL." - } - "-u" = { - set_if = "$nrpe_timeout_unknown$" + } + "-u" = { + set_if = "$nrpe_timeout_unknown$" description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL" - } - "-t" = "$nrpe_timeout$" - "-a" = { - value = "$nrpe_arguments$" - description = "Optional arguments that should be passed to the nrpe command." - order = -1 } - } + "-t" = "$nrpe_timeout$" + } - vars.nrpe_address = "$address$" + vars.nrpe_address = "$address$" + vars.nrpe_no_ssl = false + vars.nrpe_timeout_unknown = false }