]> granicus.if.org Git - icinga2/commitdiff
ITL: Add securityLevel to snmpv3 CheckCommand
authorChristian Lehmann <christian_lehmann@gmx.de>
Tue, 31 Mar 2015 13:04:58 +0000 (15:04 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 17 Jun 2015 13:27:45 +0000 (15:27 +0200)
For example if using snmpv3 without encryption.
Defaults set to privAuth to stay compatible to older versions.

fixes #9416

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

index 198c0d27c62435bed719d1fe85e46a70113c2866..d8bbdafd7e19bc6d5ee3db73c17876616e3659b5 100644 (file)
@@ -697,7 +697,8 @@ 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_auth_key   | **Required.** The authentication key.
+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.
index cd2b32c34f3812c2ed319c37f1bd71a4eef1d88e..7a2f6a9e4d1e4c55df314230d09ab055527aaa2d 100644 (file)
@@ -1003,7 +1003,7 @@ object CheckCommand "snmpv3" {
        arguments = {
                "-H" = "$snmpv3_address$"
                "-P" = 3
-               "--seclevel" = "authPriv"
+               "--seclevel" = "$snmpv3_seclevel$"
                "-U" = "$snmpv3_user$"
                "-a" = "$snmpv3_auth_alg$"
                "-A" = "$snmpv3_auth_key$"
@@ -1018,6 +1018,7 @@ object CheckCommand "snmpv3" {
        vars.snmpv3_address = "$check_address$"
        vars.snmpv3_auth_alg = "SHA"
        vars.snmpv3_priv_alg = "AES"
+       vars.snmpv3_seclevel = "authPriv"
 }
 
 object CheckCommand "snmp-uptime" {