]> granicus.if.org Git - icinga2/commitdiff
Add --units, --rate and --rate-multiplier support for the snmpv3 check command
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 18 Mar 2016 11:26:54 +0000 (12:26 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 18 Mar 2016 11:26:54 +0000 (12:26 +0100)
fixes #11194

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

index 0e20617065b70ed4805955f4b3236cbe1f691eca..5b5ac56ae80e67971ef90c341cd3786d8b7b977a 100644 (file)
@@ -960,6 +960,9 @@ snmpv3_ereg          | **Optional.** Return OK state (for that OID) if extended
 snmpv3_eregi         | **Optional.** Return OK state (for that OID) if case-insensitive extended REGEX matches.
 snmpv3_invert_search | **Optional.** Invert search result and return CRITICAL if found
 snmpv3_label         | **Optional.** Prefix label for output value.
+snmpv3_units         | **Optional.** Units label(s) for output value (e.g., 'sec.').
+snmpv3_rate_multiplier | **Optional.** Converts rate per second. For example, set to 60 to convert to per minute.
+snmpv3_rate          | **Optional.** Boolean. Enable rate calculation.
 snmpv3_timeout       | **Optional.** The command timeout in seconds. Defaults to 10 seconds.
 
 ### <a id="plugin-check-command-snmp-uptime"></a> snmp-uptime
index 25e7d834b652ab6f66b56be9e62c8e7b31c3a8c7..77b2474d218b3021337f10044e2301b4be5cabd5 100644 (file)
@@ -1418,6 +1418,12 @@ object CheckCommand "snmpv3" {
                                value = "$snmpv3_label$"
                                description = "Prefix label for output from plugin"
                }
+               "-u" = "$snmpv3_units$"
+               "--rate-multiplier" = "$snmpv3_rate_multiplier$"
+               "--rate" = {
+                       set_if = "$snmpv3_rate$"
+                       description = "Enable rate calculation"
+               }
                "-t" = "$snmpv3_timeout$"
        }