]> granicus.if.org Git - icinga2/commitdiff
ITL: Add perfsyntax parameter to nscp-local-counter CheckCommand
authorMichael Friedrich <michael.friedrich@netways.de>
Sun, 14 Aug 2016 13:47:47 +0000 (15:47 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Sun, 14 Aug 2016 13:48:03 +0000 (15:48 +0200)
fixes #12424

doc/7-icinga-template-library.md
itl/command-nscp-local.conf

index 066998ac939a8da51cfc5603a95103cbdc18c521..2738c684f1fffa76040871344754433667b6507f 100644 (file)
@@ -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`.
 
 
 
index 405f111cdcc4ce1e174897869fd97c019b2a9a5a..ee157fd56f3b56abd3465bf448f86fe2e1888a77 100644 (file)
@@ -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$"
 }