From: Christian Lehmann Date: Tue, 31 Mar 2015 13:04:58 +0000 (+0200) Subject: ITL: Add securityLevel to snmpv3 CheckCommand X-Git-Tag: v2.3.6~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d0b17ee53e8ce23976c2993552c605b863bbc43;p=icinga2 ITL: Add securityLevel to snmpv3 CheckCommand For example if using snmpv3 without encryption. Defaults set to privAuth to stay compatible to older versions. fixes #9416 Signed-off-by: Michael Friedrich --- diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index a188e8d07..b30eaf5b5 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -671,7 +671,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. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index ea82d8535..461971c1c 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -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" {