]> granicus.if.org Git - icinga2/commitdiff
Improve snmp CheckCommand, add snmpv3 CheckCommand.
authorGerd von Egidy <gerd@egidy.de>
Sun, 15 Jun 2014 22:17:07 +0000 (00:17 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 16 Jun 2014 06:49:52 +0000 (08:49 +0200)
Refs #6487

doc/6-configuring-icinga-2.md
itl/command-plugins.conf

index 16a0ac4de403ed1f40d3946367ce5723740bd450..64159e5282d7b7e96d3182e8b1c3f06e3c8e35f2 100644 (file)
@@ -2044,6 +2044,26 @@ Name            | Description
 snmp_address    | **Optional.** The host's address. Defaults to "$address$".
 snmp_oid        | **Required.** The SNMP OID.
 snmp_community  | **Optional.** The SNMP community. Defaults to "public".
+snmp_warn       | **Optional.** The warning threshold.
+snmp_crit       | **Optional.** The critical threshold.
+
+#### <a id="plugin-check-command-snmp"></a> snmpv3
+
+Check command object for the `check_snmp` plugin, using SNMPv3 authentication and encryption options.
+
+Custom Attributes:
+
+Name              | Description
+------------------|--------------
+snmpv3_address    | **Optional.** The host's address. Defaults to "$address$".
+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_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.
 
 #### <a id="plugin-check-command-snmp-uptime"></a> snmp-uptime
 
index e1ee1ae4ec2318a984aa3162d945fe2608e1c5e9..4ea1955682c19e5ae0fe3edde1660a0097765c36 100644 (file)
@@ -358,12 +358,38 @@ object CheckCommand "snmp" {
                "-H" = "$snmp_address$"
                "-o" = "$snmp_oid$"
                "-C" = "$snmp_community$"
+               "-c" = "$snmp_crit$"
+               "-w" = "$snmp_warn$"
        }
 
        vars.snmp_address = "$address$"
        vars.snmp_community = "public"
 }
 
+object CheckCommand "snmpv3" {
+       import "plugin-check-command"
+
+       command = PluginDir + "/check_snmp"
+
+       arguments = {
+               "-H" = "$snmpv3_address$"
+               "-P" = 3
+               "--seclevel" = "authPriv"
+               "-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$"
+       }
+
+       vars.snmpv3_address = "$address$"
+       vars.snmpv3_auth_alg = "SHA"
+       vars.snmpv3_priv_alg = "AES"
+}
+
 object CheckCommand "snmp-uptime" {
        import "snmp"