]> 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)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Apr 2016 08:07:21 +0000 (10:07 +0200)
fixes #11194

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

index 1aa5e3094322305175e19aef4f07a38b2e291feb..800918edad6a572fab9f9ab4c59a8dc421f4dd18 100644 (file)
@@ -944,6 +944,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 3763b93ee26ef330d23e4ae3870875cffaa449b9..017f2f21330ae55df22c6fc0628b3bbdc94eea93 100644 (file)
@@ -1198,6 +1198,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$"
        }