From f701401d950be7c365acb8067bdd9b4d2a7101fc Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Mon, 29 Nov 2021 15:11:00 +0100 Subject: [PATCH 01/11] add all businessprocess module check parameters --- itl/plugins-contrib.d/icingacli.conf | 34 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 3086aabece9..7cc3a45b795 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -10,6 +10,18 @@ object CheckCommand "icingacli-businessprocess" { command += [ "businessprocess", "process", "check" ] arguments = { + "--ack-is-ok" = { + set_if = "$icingacli_businessprocess_ack_ok$" + description = "Treat acknowledged hosts/services always as UP/OK." + } + "--blame" = { + set_if = "$icingacli_businessprocess_blame$" + description = "Show problem details as a tree reduced to the nodes which have the same state as the business process" + } + "--colors" = { + set_if = "$icingacli_businessprocess_colors$" + description = "Show colored output" + } "--config" = { value = "$icingacli_businessprocess_config$" description = "Configuration file containing your business process without file extension" @@ -18,10 +30,10 @@ object CheckCommand "icingacli-businessprocess" { set_if = "$icingacli_businessprocess_details$" description = "Get details for root cause analysis" } - "--state-type" = { - value = "$icingacli_businessprocess_statetype$" - description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" - } + "--downtime-is-ok" = { + set_if = "$icingacli_businessprocess_downtime_ok$" + description = "Treat hosts/services in downtime always as UP/OK." + } "--process" = { value = "$icingacli_businessprocess_process$" description = "Business process to monitor" @@ -29,9 +41,23 @@ object CheckCommand "icingacli-businessprocess" { required = true order = -1 } + "--root-cause" = { + set_if = "$icingacli_businessprocess_root_cause$" + description = "Used in combination with --blame. Only shows the path of the nodes which are responsible for the state of the business process" + } + "--state-type" = { + value = "$icingacli_businessprocess_statetype$" + description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" + } } + + vars.icingacli_businessprocess_ack_ok = false + vars.icingacli_businessprocess_blame = false + vars.icingacli_businessprocess_colors = false vars.icingacli_businessprocess_details = false + vars.icingacli_businessprocess_downtime_ok = false + vars.icingacli_businessprocess_root_cause = false } object CheckCommand "icingacli-director" { From 0569edf5c96c6851fd211bf3febb33ea5046e3f7 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Mon, 29 Nov 2021 15:18:59 +0100 Subject: [PATCH 02/11] add all parameters to businessprocess command --- itl/plugins-contrib.d/icingacli.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 7cc3a45b795..9fde72f05f6 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -51,7 +51,6 @@ object CheckCommand "icingacli-businessprocess" { } } - vars.icingacli_businessprocess_ack_ok = false vars.icingacli_businessprocess_blame = false vars.icingacli_businessprocess_colors = false From ef48d181bd9285c59980c3dd4e69b4345a4388b3 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Fri, 3 Dec 2021 15:05:23 +0100 Subject: [PATCH 03/11] changed var names and order --- itl/plugins-contrib.d/icingacli.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 9fde72f05f6..33e4044cb9c 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -11,7 +11,7 @@ object CheckCommand "icingacli-businessprocess" { arguments = { "--ack-is-ok" = { - set_if = "$icingacli_businessprocess_ack_ok$" + set_if = "$icingacli_businessprocess_ackisok$" description = "Treat acknowledged hosts/services always as UP/OK." } "--blame" = { @@ -30,8 +30,12 @@ object CheckCommand "icingacli-businessprocess" { set_if = "$icingacli_businessprocess_details$" description = "Get details for root cause analysis" } + "--state-type" = { + value = "$icingacli_businessprocess_statetype$" + description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" + } "--downtime-is-ok" = { - set_if = "$icingacli_businessprocess_downtime_ok$" + set_if = "$icingacli_businessprocess_downtimeisok$" description = "Treat hosts/services in downtime always as UP/OK." } "--process" = { @@ -45,10 +49,6 @@ object CheckCommand "icingacli-businessprocess" { set_if = "$icingacli_businessprocess_root_cause$" description = "Used in combination with --blame. Only shows the path of the nodes which are responsible for the state of the business process" } - "--state-type" = { - value = "$icingacli_businessprocess_statetype$" - description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" - } } vars.icingacli_businessprocess_ack_ok = false From b135ceb099cafe5112ffaca03a9e265f0c4e2a28 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Fri, 3 Dec 2021 15:06:43 +0100 Subject: [PATCH 04/11] changed var names and order --- itl/plugins-contrib.d/icingacli.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 33e4044cb9c..c1347faa923 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -51,11 +51,11 @@ object CheckCommand "icingacli-businessprocess" { } } - vars.icingacli_businessprocess_ack_ok = false + vars.icingacli_businessprocess_ackisok = false vars.icingacli_businessprocess_blame = false vars.icingacli_businessprocess_colors = false vars.icingacli_businessprocess_details = false - vars.icingacli_businessprocess_downtime_ok = false + vars.icingacli_businessprocess_downtimeisok = false vars.icingacli_businessprocess_root_cause = false } From c9042857ace778253b0d2405597b01b4db192936 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Fri, 3 Dec 2021 15:14:53 +0100 Subject: [PATCH 05/11] missed one var --- itl/plugins-contrib.d/icingacli.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index c1347faa923..5ced970d4e1 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -46,7 +46,7 @@ object CheckCommand "icingacli-businessprocess" { order = -1 } "--root-cause" = { - set_if = "$icingacli_businessprocess_root_cause$" + set_if = "$icingacli_businessprocess_rootcause$" description = "Used in combination with --blame. Only shows the path of the nodes which are responsible for the state of the business process" } } @@ -56,7 +56,7 @@ object CheckCommand "icingacli-businessprocess" { vars.icingacli_businessprocess_colors = false vars.icingacli_businessprocess_details = false vars.icingacli_businessprocess_downtimeisok = false - vars.icingacli_businessprocess_root_cause = false + vars.icingacli_businessprocess_rootcause = false } object CheckCommand "icingacli-director" { From 2e9c53a51d80f8abc1f79eb25cf3b59375f76a63 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Tue, 22 Feb 2022 08:44:45 +0100 Subject: [PATCH 06/11] moved --state-type parameter --- itl/plugins-contrib.d/icingacli.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 5ced970d4e1..0ac0875d355 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -30,10 +30,6 @@ object CheckCommand "icingacli-businessprocess" { set_if = "$icingacli_businessprocess_details$" description = "Get details for root cause analysis" } - "--state-type" = { - value = "$icingacli_businessprocess_statetype$" - description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" - } "--downtime-is-ok" = { set_if = "$icingacli_businessprocess_downtimeisok$" description = "Treat hosts/services in downtime always as UP/OK." @@ -49,6 +45,10 @@ object CheckCommand "icingacli-businessprocess" { set_if = "$icingacli_businessprocess_rootcause$" description = "Used in combination with --blame. Only shows the path of the nodes which are responsible for the state of the business process" } + "--state-type" = { + value = "$icingacli_businessprocess_statetype$" + description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" + } } vars.icingacli_businessprocess_ackisok = false @@ -57,6 +57,7 @@ object CheckCommand "icingacli-businessprocess" { vars.icingacli_businessprocess_details = false vars.icingacli_businessprocess_downtimeisok = false vars.icingacli_businessprocess_rootcause = false + vars.icingacli_businessprocess_statetype = false } object CheckCommand "icingacli-director" { From 19943fedd882818cea8377860fb0b1d662606e87 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Tue, 22 Feb 2022 08:50:41 +0100 Subject: [PATCH 07/11] added new parameters to business process command --- doc/10-icinga-template-library.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 8d5ddd2fac3..9bf48a4ccdb 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2839,6 +2839,11 @@ icingacli_businessprocess_process | **Required.** Business process to mo icingacli_businessprocess_config | **Optional.** Configuration file containing your business process without file extension. icingacli_businessprocess_details | **Optional.** Get details for root cause analysis. Defaults to false. icingacli_businessprocess_statetype | **Optional.** Define which state type to look at, `soft` or `hard`. Overrides the default value inside the businessprocess module, if configured. +icingacli_businessprocess_ackisok | **Optional.** Treat acknowledged hosts/services always as UP/OK. +icingacli_businessprocess_blame | **Optional.** Show problem details as a tree reduced to the nodes which have the same state as the business process +icingacli_businessprocess_colors | **Optional.** Show colored output +icingacli_businessprocess_downtimeisok | **Optional.** Treat hosts/services in downtime always as UP/OK. +icingacli_businessprocess_rootcause | **Optional.** Used in combination with *icingacli_businessprocess_blame*. Only shows the path of the nodes which are responsible for the state of the business process #### Director From 454fc7c6f3ae106f8ed4649a4a53f95be1576dde Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Wed, 23 Feb 2022 15:39:28 +0100 Subject: [PATCH 08/11] grammar correction --- doc/10-icinga-template-library.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 9bf48a4ccdb..e1628f4459d 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2840,10 +2840,10 @@ icingacli_businessprocess_config | **Optional.** Configuration file con icingacli_businessprocess_details | **Optional.** Get details for root cause analysis. Defaults to false. icingacli_businessprocess_statetype | **Optional.** Define which state type to look at, `soft` or `hard`. Overrides the default value inside the businessprocess module, if configured. icingacli_businessprocess_ackisok | **Optional.** Treat acknowledged hosts/services always as UP/OK. -icingacli_businessprocess_blame | **Optional.** Show problem details as a tree reduced to the nodes which have the same state as the business process -icingacli_businessprocess_colors | **Optional.** Show colored output +icingacli_businessprocess_blame | **Optional.** Show problem details as a tree reduced to the nodes which have the same state as the business process. +icingacli_businessprocess_colors | **Optional.** Show colored output. icingacli_businessprocess_downtimeisok | **Optional.** Treat hosts/services in downtime always as UP/OK. -icingacli_businessprocess_rootcause | **Optional.** Used in combination with *icingacli_businessprocess_blame*. Only shows the path of the nodes which are responsible for the state of the business process +icingacli_businessprocess_rootcause | **Optional.** Used in combination with *icingacli_businessprocess_blame*. Only shows the paths of the nodes which are responsible for the state of the business process. #### Director From dcf802e3c7af68b8d5d86542175c428a4ecbff26 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Wed, 23 Feb 2022 15:41:35 +0100 Subject: [PATCH 09/11] moving parameter back again --- itl/plugins-contrib.d/icingacli.conf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 0ac0875d355..92b15ed14a3 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -30,10 +30,14 @@ object CheckCommand "icingacli-businessprocess" { set_if = "$icingacli_businessprocess_details$" description = "Get details for root cause analysis" } + "--state-type" = { + value = "$icingacli_businessprocess_statetype$" + description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" + } "--downtime-is-ok" = { set_if = "$icingacli_businessprocess_downtimeisok$" description = "Treat hosts/services in downtime always as UP/OK." - } + } "--process" = { value = "$icingacli_businessprocess_process$" description = "Business process to monitor" @@ -45,10 +49,6 @@ object CheckCommand "icingacli-businessprocess" { set_if = "$icingacli_businessprocess_rootcause$" description = "Used in combination with --blame. Only shows the path of the nodes which are responsible for the state of the business process" } - "--state-type" = { - value = "$icingacli_businessprocess_statetype$" - description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default" - } } vars.icingacli_businessprocess_ackisok = false @@ -57,7 +57,6 @@ object CheckCommand "icingacli-businessprocess" { vars.icingacli_businessprocess_details = false vars.icingacli_businessprocess_downtimeisok = false vars.icingacli_businessprocess_rootcause = false - vars.icingacli_businessprocess_statetype = false } object CheckCommand "icingacli-director" { From 555807a1c71b48dfda19b068907e113b3d904e93 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Wed, 23 Feb 2022 15:44:03 +0100 Subject: [PATCH 10/11] removed full stops in description like in the other parameters --- itl/plugins-contrib.d/icingacli.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 92b15ed14a3..1d84d08070b 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -12,7 +12,7 @@ object CheckCommand "icingacli-businessprocess" { arguments = { "--ack-is-ok" = { set_if = "$icingacli_businessprocess_ackisok$" - description = "Treat acknowledged hosts/services always as UP/OK." + description = "Treat acknowledged hosts/services always as UP/OK" } "--blame" = { set_if = "$icingacli_businessprocess_blame$" @@ -36,7 +36,7 @@ object CheckCommand "icingacli-businessprocess" { } "--downtime-is-ok" = { set_if = "$icingacli_businessprocess_downtimeisok$" - description = "Treat hosts/services in downtime always as UP/OK." + description = "Treat hosts/services in downtime always as UP/OK" } "--process" = { value = "$icingacli_businessprocess_process$" From 06457f7690022561385f119f3ca8520d5b2d57a1 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Thu, 24 Feb 2022 12:52:29 +0100 Subject: [PATCH 11/11] 's' added --- itl/plugins-contrib.d/icingacli.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf index 1d84d08070b..6914f68b2f7 100644 --- a/itl/plugins-contrib.d/icingacli.conf +++ b/itl/plugins-contrib.d/icingacli.conf @@ -47,7 +47,7 @@ object CheckCommand "icingacli-businessprocess" { } "--root-cause" = { set_if = "$icingacli_businessprocess_rootcause$" - description = "Used in combination with --blame. Only shows the path of the nodes which are responsible for the state of the business process" + description = "Used in combination with --blame. Only shows the paths of the nodes which are responsible for the state of the business process" } }