From c92ceff1ed8679ce7f7e1efa9cb4e0a2303eeac2 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 18 Mar 2016 12:26:54 +0100 Subject: [PATCH] Add --units, --rate and --rate-multiplier support for the snmpv3 check command fixes #11194 --- doc/7-icinga-template-library.md | 3 +++ itl/command-plugins.conf | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 1aa5e3094..800918eda 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -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. ### snmp-uptime diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 3763b93ee..017f2f213 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -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$" } -- 2.40.0