[icinga-checkins] icinga.org: icinga2/master: ITL: Add perfsyntax parameter to nscp-local-counter CheckCommand

git at icinga.org git at icinga.org
Sun Aug 14 15:48:11 CEST 2016


Module: icinga2
Branch: master
Commit: 5db2ed90d8b43ef480e401ad3cbe95e428800a3a
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=5db2ed90d8b43ef480e401ad3cbe95e428800a3a

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Sun Aug 14 15:47:47 2016 +0200

ITL: Add perfsyntax parameter to nscp-local-counter CheckCommand

fixes #12424

---

 doc/7-icinga-template-library.md |    1 +
 itl/command-nscp-local.conf      |    5 +++++
 2 files changed, 6 insertions(+)

diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md
index 066998a..2738c68 100644
--- a/doc/7-icinga-template-library.md
+++ b/doc/7-icinga-template-library.md
@@ -1691,6 +1691,7 @@ nscp_counter_warning   | **Optional.** WARNING Threshold.
 nscp_counter_critical  | **Optional.** CRITICAL Threshold.
 nscp_counter_arguments | **Optional.** Additional arguments.
 nscp_counter_showall   | **Optional.** Shows more details in plugin output, default to false.
+nscp_counter_perfsyntax | **Optional.** Apply performance data label, e.g. `Total Processor Time` to avoid special character problems. Defaults to `nscp_counter_name`.
 
 
 
diff --git a/itl/command-nscp-local.conf b/itl/command-nscp-local.conf
index 405f111..ee157fd 100644
--- a/itl/command-nscp-local.conf
+++ b/itl/command-nscp-local.conf
@@ -253,6 +253,10 @@ object CheckCommand "nscp-local-counter" {
 		"--critical" = {
 			value = "value $nscp_counter_op$ $nscp_counter_critical$"
 		}
+		"perf-syntax" = {
+			value = "perf-syntax=$nscp_counter_perfsyntax$"
+			skip_key = true
+		}
 		"-a" = {
 			value = "$nscp_counter_arguments$"
 			skip_key = true
@@ -270,4 +274,5 @@ object CheckCommand "nscp-local-counter" {
 	vars.nscp_query = "check_pdh"
 	vars.nscp_showall = "$nscp_counter_showall$"
 	vars.nscp_counter_less = false
+	vars.nscp_counter_perfsyntax = "$nscp_counter_name$"
 }



More information about the icinga-checkins mailing list