]> granicus.if.org Git - icinga2/commitdiff
ITL: Improve snmpv3 CheckCommand section
authorPetr Ruzicka <petr.ruzicka@gmail.com>
Tue, 4 Aug 2015 12:50:40 +0000 (14:50 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 7 Aug 2015 11:32:49 +0000 (13:32 +0200)
fixes #9827

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
doc/7-icinga-template-library.md
itl/command-plugins.conf

index b16fd90085332a63dc4030cde0faa1776e1303b1..93104955a85d0aaaf35d03e446bf24a413a7b2b7 100644 (file)
@@ -733,19 +733,24 @@ Check command object for the `check_snmp` plugin, using SNMPv3 authentication an
 
 Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
 
-Name              | Description
-------------------|--------------
-snmpv3_address    | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
-snmpv3_user       | **Required.** The username to log in with.
-snmpv3_auth_alg   | **Optional.** The authentication algorithm. Defaults to SHA.
-snmpv3_seclevel   | **Optional.** The security level. Defaults to authPriv.
-snmpv3_auth_key   | **Required,** The authentication key. Required if `snmpv3_seclevel` is set to `authPriv` otherwise optional.
-snmpv3_priv_alg   | **Optional.** The encryption algorithm. Defaults to AES.
-snmpv3_priv_key   | **Required.** The encryption key.
-snmpv3_oid        | **Required.** The SNMP OID.
-snmpv3_warn       | **Optional.** The warning threshold.
-snmpv3_crit       | **Optional.** The critical threshold.
-snmpv3_label      | **Optional.** Prefix label for output value.
+Name                 | Description
+---------------------|--------------
+snmpv3_address       | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
+snmpv3_getnext       | **Optional.** Use SNMP GETNEXT instead of SNMP GET.
+snmpv3_seclevel      | **Optional.** The security level. Defaults to authPriv.
+snmpv3_auth_alg      | **Optional.** The authentication algorithm. Defaults to SHA.
+snmpv3_user          | **Required.** The username to log in with.
+snmpv3_auth_key      | **Required,** The authentication key. Required if `snmpv3_seclevel` is set to `authPriv` otherwise optional.
+snmpv3_priv_key      | **Required.** The encryption key.
+snmpv3_oid           | **Required.** The SNMP OID.
+snmpv3_priv_alg      | **Optional.** The encryption algorithm. Defaults to AES.
+snmpv3_warn          | **Optional.** The warning threshold.
+snmpv3_crit          | **Optional.** The critical threshold.
+snmpv3_string        | **Optional.** Return OK state (for that OID) if STRING is an exact match.
+snmpv3_ereg          | **Optional.** Return OK state (for that OID) if extended regular expression REGEX matches.
+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.
 
 ## <a id="plugin-check-command-snmp-uptime"></a> snmp-uptime
 
index 2674979c0d91e20eb9233cca7841bc388610c1f8..59d6306f2d4377e3089bd371be98d80cc2371f7b 100644 (file)
@@ -1057,18 +1057,74 @@ object CheckCommand "snmpv3" {
        command = [ PluginDir + "/check_snmp" ]
 
        arguments = {
-               "-H" = "$snmpv3_address$"
-               "-P" = 3
-               "--seclevel" = "$snmpv3_seclevel$"
-               "-U" = "$snmpv3_user$"
-               "-a" = "$snmpv3_auth_alg$"
-               "-A" = "$snmpv3_auth_key$"
-               "-x" = "$snmpv3_priv_alg$"
-               "-X" = "$snmpv3_priv_key$"
-               "-o" = "$snmpv3_oid$"
-               "-c" = "$snmpv3_crit$"
-               "-w" = "$snmpv3_warn$"
-               "-l" = "$snmpv3_label$"
+               "-H" = {
+                               value = "$snmpv3_address$"
+                               description = "Host name, IP Address, or unix socket (must be an absolute path)"
+               }
+               "-n" = {
+                               set_if = "$snmpv3_getnext$"
+                               description = "Use SNMP GETNEXT instead of SNMP GET"
+               }
+               "-P" = {
+                               value = 3
+                               description = "SNMP protocol version"
+               }
+               "-L" = {
+                               value = "$snmpv3_seclevel$"
+                               description = "SNMPv3 securityLevel"
+               }
+               "-a" = {
+                               value = "$snmpv3_auth_alg$"
+                               description = "SNMPv3 auth proto"
+               }
+               "-U" = {
+                               value = "$snmpv3_user$"
+                               description = "SNMPv3 username"
+               }
+               "-A" = {
+                               value = "$snmpv3_auth_key$"
+                               description = "SNMPv3 authentication password"
+               }
+               "-X" = {
+                               value = "$snmpv3_priv_key$"
+                               description = "SNMPv3 privacy password"
+               }
+               "-o" = {
+                               value = "$snmpv3_oid$"
+                               description = "Object identifier(s) or SNMP variables whose value you wish to query"
+               }
+               "-x" = {
+                               value = "$snmpv3_priv_alg$"
+                               description = "SNMPv3 priv proto (default DES)"
+               }
+               "-w" = {
+                               value = "$snmpv3_warn$"
+                               description = "Warning threshold range(s)"
+               }
+               "-c" = {
+                               value = "$snmpv3_crit$"
+                               description = "Critical threshold range(s)"
+               }
+               "-s" = {
+                               value = "$snmpv3_string$"
+                               description = "Return OK state (for that OID) if STRING is an exact match"
+               }
+               "-r" = {
+                               value = "$snmpv3_ereg$"
+                               description = "Return OK state (for that OID) if extended regular expression REGEX matches"
+               }
+               "-R" = {
+                               value = "$snmpv3_eregi$"
+                               description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
+               }
+               "--invert-search" = {
+                               set_if = "$snmpv3_invert_search$"
+                               description = "Invert search result and return CRITICAL if found"
+               }
+               "-l" = {
+                               value = "$snmpv3_label$"
+                               description = "Prefix label for output from plugin"
+               }
        }
 
        vars.snmpv3_address = "$check_address$"