Skip to content

Commit

Permalink
ITL: Improve snmpv3 CheckCommand section
Browse files Browse the repository at this point in the history
fixes #9827

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
  • Loading branch information
ruzickap authored and gunnarbeutner committed Aug 24, 2015
1 parent 4b79e5a commit dc317a1
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 25 deletions.
31 changes: 18 additions & 13 deletions doc/7-icinga-template-library.md
Expand Up @@ -730,19 +730,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

Expand Down
80 changes: 68 additions & 12 deletions itl/command-plugins.conf
Expand Up @@ -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$"
Expand Down

0 comments on commit dc317a1

Please sign in to comment.