From e61d43468baf0c2ae63bf2f0c8e487d4d5d5f3e7 Mon Sep 17 00:00:00 2001 From: Yannick Charton Date: Mon, 14 Aug 2017 17:51:23 +0200 Subject: [PATCH] Feature/itl check snmp options (#5387) Add missing options for the definition of the ITL snmp CheckCommand snmp_offset, snmp_output_delimiter and snmp_perf_oids options --- doc/10-icinga-template-library.md | 3 +++ itl/command-plugins.conf | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 12574e017..96c9fd3cf 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -1198,6 +1198,9 @@ snmp_rate_multiplier | **Optional.** Converts rate per second. For example, set snmp_rate | **Optional.** Boolean. Enable rate calculation. snmp_getnext | **Optional.** Boolean. Use SNMP GETNEXT. Defaults to false. snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 10 seconds. +snmp_offset | **Optional.** Add/substract the specified OFFSET to numeric sensor data. +snmp_output_delimiter | **Optional.** Separates output on multiple OID requests. +snmp_perf_oids | **Optional.** Label performance data with OIDs instead of --label's. ### snmpv3 diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 964a2f256..7ccb6e3dc 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -1781,6 +1781,18 @@ object CheckCommand "snmp" { set_if = "$snmp_getnext$" description = "Use SNMP GETNEXT instead of SNMP GET" } + "--offset" = { + value = "$snmp_offset$" + description = "Add/substract the specified OFFSET to numeric sensor data" + } + "-D" = { + value = "$snmp_output_delimiter$" + description = "Separates output on multiple OID requests" + } + "-O" = { + set_if = "$snmp_perf_oids$" + description = "Label performance data with OIDs instead of --label's" + } } vars.snmp_address = {{