From 414a8ec5349982ae4e84231b4b189b6275c0b801 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 30 Jan 2018 14:58:57 +0100 Subject: [PATCH] Move the "passive" check command to command-icinga.conf --- doc/10-icinga-template-library.md | 22 +++++++++++----------- itl/command-icinga.conf | 7 +++++++ itl/command-plugins.conf | 7 ------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 769eea5a8..91c3c23a4 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -132,6 +132,17 @@ Name | Description dummy\_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0. dummy\_text | **Optional.** Plugin output. Defaults to "Check was successful.". +### passive + +Specialised check command object for passive checks which uses the functionality of the "dummy" check command with appropriate default values. + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +----------------|-------------- +dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 3. +dummy_text | **Optional.** Plugin output. Defaults to "No Passive Check Result Received.". + ### random Check command for the built-in `random` check. This check returns random states @@ -923,17 +934,6 @@ ntp_ipv4 | **Optional.** Use IPv4 connection. Defaults to false. ntp_ipv6 | **Optional.** Use IPv6 connection. Defaults to false. -### passive - -Specialised check command object for passive checks executing the `check_dummy` plugin with appropriate default values. - -Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): - -Name | Description -----------------|-------------- -dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 3. -dummy_text | **Optional.** Plugin output. Defaults to "No Passive Check Result Received.". - ### pgsql The [check_pgsql](https://www.monitoring-plugins.org/doc/man/check_pgsql.html) plugin diff --git a/itl/command-icinga.conf b/itl/command-icinga.conf index f0c1e68af..4141b9030 100644 --- a/itl/command-icinga.conf +++ b/itl/command-icinga.conf @@ -38,6 +38,13 @@ object CheckCommand "dummy" { vars.dummy_text = "Check was successful." } +object CheckCommand "passive" { + import "dummy" + + vars.dummy_state = 3 + vars.dummy_text = "No Passive Check Result Received." +} + object CheckCommand "random" { import "random-check-command" } diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index dcf9771e9..2963efb06 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -176,13 +176,6 @@ object CheckCommand "fping6" { vars.fping_address = "$address6$" } -object CheckCommand "passive" { - import "dummy" - - vars.dummy_state = 3 - vars.dummy_text = "No Passive Check Result Received." -} - object CheckCommand "tcp" { import "ipv4-or-ipv6"