From b5ce0fda795ea2c2f1d2f40800387ebfb411dd95 Mon Sep 17 00:00:00 2001 From: Lee Clemens Date: Wed, 5 Jul 2017 15:36:16 -0400 Subject: [PATCH] itl: Add manubulon/check_snmp_env.pl as CheckCommand snmp-env --- doc/10-icinga-template-library.md | 27 ++++++++++++++++++++++++ itl/command-plugins-manubulon.conf | 34 ++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index ac90f743a..83c16d9d3 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -1872,6 +1872,33 @@ You can enable these plugin check commands by adding the following the include d Cisco CSS | Yes | ?? | Yes | Yes | No | ?? | check_snmp_css.pl +### snmp-env + +Check command object for the [check_snmp_env.pl](http://nagios.manubulon.com/snmp_env.html) plugin. + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + + +Name | Description +------------------------|-------------- +snmp_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. +snmp_nocrypt | **Optional.** Define SNMP encryption. If set, **snmp_v3** needs to be set. Defaults to false. +snmp_community | **Optional.** The SNMP community. Defaults to "public". +snmp_port | **Optional.** The SNMP port connection. +snmp_v2 | **Optional.** SNMP version to 2c. Defaults to false. +snmp_v3 | **Optional.** SNMP version to 3. Defaults to false. +snmp_login | **Optional.** SNMP version 3 username. Defaults to "snmpuser". +snmp_password | **Required.** SNMP version 3 password. No value defined as default. +snmp_v3_use_privpass | **Optional.** Define to use SNMP version 3 priv password. Defaults to false. +snmp_v3_use_authprotocol| **Optional.** Define to use SNMP version 3 authentication protocol. Defaults to false. +snmp_authprotocol | **Optional.** SNMP version 3 authentication protocol. Defaults to "md5,des". +snmp_privpass | **Required.** SNMP version 3 priv password. No value defined as default. +snmp_env_type | **Optional.** Environment Type [cisco|nokia|bc|iron|foundry|linux]. Defaults to "cisco". +snmp_env_fan | **Optional.** Minimum fan rpm value (only needed for 'iron' & 'linux') +snmp_env_celsius | **Optional.** Maximum temp in degrees celsius (only needed for 'iron' & 'linux') +snmp_perf | **Optional.** Enable perfdata values. Defaults to true. +snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds. + ### snmp-load Check command object for the [check_snmp_load.pl](http://nagios.manubulon.com/snmp_load.html) plugin. diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf index 74c3cbc3c..a84aee7c2 100644 --- a/itl/command-plugins-manubulon.conf +++ b/itl/command-plugins-manubulon.conf @@ -87,6 +87,40 @@ template CheckCommand "snmp-manubulon-command" { } +/** + * snmp env + * Url reference: http://nagios.manubulon.com/snmp_env.html + */ + +object CheckCommand "snmp-env" { + import "snmp-manubulon-command" + + command = [ ManubulonPluginDir + "/check_snmp_env.pl" ] + + arguments += { + "-T" = { + value = "$snmp_env_type$" + description = "Environment Type [cisco|nokia|bc|iron|foundry|linux]" + } + "-F" = { + value = "$snmp_env_fan$" + description = "Minimum fan rpm value (only needed for 'iron' & 'linux')" + } + "-c" = { + value = "$snmp_env_celsius$" + description = "Maximum temp in degrees celsius (only needed for 'iron' & 'linux')" + } + "-f" = { + set_if = "$snmp_perf$" + description = "Perfparse compatible output" + } + } + + vars.snmp_env_type = "cisco" + vars.snmp_perf = true +} + + /** * snmp load * Url reference: http://nagios.manubulon.com/snmp_load.html