Merge branch 'feature/snmp-plugins-6650'

fixes #6650
This commit is contained in:
Michael Friedrich 2014-08-27 20:10:58 +02:00
commit ad129f93a6
5 changed files with 400 additions and 1 deletions

View File

@ -2307,3 +2307,170 @@ Check command object for the `check_running_kernel` plugin
provided by the `nagios-plugins-contrib` package on Debian.
The `running_kernel` check command does not support any vars.
## <a id="snmp-manubulon-plugin-check-commands"></a> SNMP Manubulon Plugin Check Commands
### <a id="snmp-manubulon-plugin-check-commands-overview"></a> Overview
The `SNMP Manubulon Plugin Check Commands` provide example configuration for plugin check
commands provided by the [SNMP Manubulon project](http://nagios.manubulon.com/index_snmp.html).
The SNMP manubulon plugin check commands assume that the global constant named `ManubulonPluginDir`
is set to the path where the Manubublon SNMP plugins are installed.
You can enable these plugin check commands by adding the following the include directive in your
configuration [icinga2.conf](#icinga2-conf) file:
include <manubulon>
### Checks by Host Type
**N/A** : Not available for this type.
**SNMP** : Available for simple SNMP query.
**??** : Untested.
**Specific** : Script name for platform specific checks.
Host type | Interface | storage | load/cpu | mem | process | env | specific
------------------------|------------|----------|-----------|-----|----------|-----|-------------------------
Linux | Yes | Yes | Yes | Yes | Yes | No |
Windows | Yes | Yes | Yes | Yes | Yes | No | check_snmp_win.pl
Cisco router/switch | Yes | N/A | Yes | Yes | N/A | Yes |
HP router/switch | Yes | N/A | Yes | Yes | N/A | No |
Bluecoat proxy | Yes | SNMP | Yes | SNMP| No | Yes |
CheckPoint on SPLAT | Yes | Yes | Yes | Yes | Yes | No | check_snmp_cpfw.pl
CheckPoint on Nokia IP | Yes | Yes | Yes | No | ?? | No | check_snmp_vrrp.pl
Boostedge | Yes | Yes | Yes | Yes | ?? | No | check_snmp_boostedge.pl
AS400 | Yes | Yes | Yes | Yes | No | No |
NetsecureOne Netbox | Yes | Yes | Yes | ?? | Yes | No |
Radware Linkproof | Yes | N/A | SNMP | SNMP| No | No | check_snmp_linkproof_nhr <br> check_snmp_vrrp.pl
IronPort | Yes | SNMP | SNMP | SNMP| No | Yes |
Cisco CSS | Yes | ?? | Yes | Yes | No | ?? | check_snmp_css.pl
#### <a id="plugin-check-command-snmp-load"></a> snmp-load
Check command object for the [check_snmp_load.pl](http://nagios.manubulon.com/snmp_load.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
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_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_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_load_type | **Optional.** Load type. Defaults to "stand". Check all available types int the [snmp load](http://nagios.manubulon.com/snmp_load.html) documentation.
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
#### <a id="plugin-check-command-snmp-memory"></a> snmp-memory
Check command object for the [check_snmp_mem.pl](http://nagios.manubulon.com/snmp_mem.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
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_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_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
#### <a id="plugin-check-command-snmp-storage"></a> snmp-storage
Check command object for the [check_snmp_storage.pl](http://nagios.manubulon.com/snmp_storage.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
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_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_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_storage_name | **Optional.** Storage name. Default to regex "^/$$". More options available in the [snmp storage](http://nagios.manubulon.com/snmp_storage.html) documentation.
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
#### <a id="plugin-check-command-snmp-int"></a> snmp-int
Check command object for the [check_snmp_int.pl](http://nagios.manubulon.com/snmp_int.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
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_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_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_interface | **Optional.** Network interface name. Default to regex "eth0".
snmp_interface_perf | **Optional.** Check the input/ouput bandwidth of the interface. Defaults to "true".
snmp_interface_bits | **Optional.** Make the warning and critical levels in KBits/s. Defaults to "true".
snmp_interface_64bit | **Optional.** Use 64 bits counters instead of the standard counters when checking bandwidth & performance data for interface >= 1Gbps. Defaults to "false".
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".
#### <a id="plugin-check-command-snmp-process"></a> snmp-process
Check command object for the [check_snmp_process.pl](http://nagios.manubulon.com/snmp_process.html) plugin.
Custom Attributes:
Name | Description
------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
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_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_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_process_name | **Optional.** Name of the process (regexp). No trailing slash!. Defaults to ".*".
snmp_perf | **Optional.** Enable perfdata values. Defaults to "true".

View File

@ -6,6 +6,12 @@
/* The directory which contains the plugins from the Monitoring Plugins project. */
const PluginDir = "@ICINGA2_PLUGINDIR@"
/* The directory which contains the Manubulon plugins.
* Check the documentation, chapter "SNMP Manubulon Plugin Check Commands", for details.
*/
const ManubulonPluginDir = "@ICINGA2_PLUGINDIR@"
/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`.
* This should be the common name from the API certificate.
*/

View File

@ -16,6 +16,6 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
install(
FILES itl command.conf command-icinga.conf timeperiod.conf plugins command-plugins.conf
FILES itl command.conf command-icinga.conf timeperiod.conf plugins command-plugins.conf manubulon command-plugins-manubulon.conf
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include
)

View File

@ -0,0 +1,202 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software Foundation *
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
/**
* main snmp-manubulon template
*/
template CheckCommand "snmp-manubulon-command" {
import "plugin-check-command"
arguments = {
"-H" = "$snmp_address$"
"-C" = {
set_if = "$snmp_nocrypt$"
value = "$snmp_community$"
}
"-p" = "$snmp_port$"
"-v2c" = {
set_if = "$snmp_v2$"
}
"-l" = {
set_if = "$snmp_v3$"
value = "$snmp_login$"
}
"-x" = {
set_if = "$snmp_v3$"
value = "$snmp_password$"
}
"-L" = {
set_if = "$snmp_v3_use_authprotocol$"
value = "$snmp_authprotocol$"
}
"-X" = {
set_if = "$snmp_v3_use_privpass$"
value = "$snmp_privpass$"
}
"-w" = "$snmp_warn$"
"-c" = "$snmp_crit$"
}
vars.snmp_address = "$address$"
vars.snmp_nocrypt = true
vars.snmp_community = "public"
vars.snmp_v2 = false
vars.snmp_v3 = false
vars.snmp_login = "snmpuser"
vars.snmp_v3_use_privpass = false
vars.snmp_v3_use_authprotocol = false
vars.snmp_authprotocol = "md5,des"
}
/**
* snmp load
* Url reference: http://nagios.manubulon.com/snmp_load.html
*/
object CheckCommand "snmp-load" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_load.pl" ]
arguments += {
"-T" = "$snmp_load_type$"
"-f" = {
set_if = "$snmp_perf$"
}
}
vars.snmp_load_type = "stand"
vars.snmp_warn = 85
vars.snmp_crit = 95
vars.snmp_perf = true
}
/**
* Memory and swap usage on Linux given by Net-snmp
* Memory usage on cisco routers or Pix
* For other systems use check_snmp_storage.pl
* Url reference: http://nagios.manubulon.com/snmp_mem.html
*/
object CheckCommand "snmp-memory" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_mem.pl" ]
arguments += {
"-f" = {
set_if = "$snmp_perf$"
}
}
vars.snmp_warn = "94,50"
vars.snmp_crit = "98,80"
vars.snmp_perf = true
}
/**
* snmp storage - Disk/Memory
* Url reference: http://nagios.manubulon.com/snmp_storage.html
*/
object CheckCommand "snmp-storage" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]
arguments += {
"-m" = "$snmp_storage_name$"
"-f" = {
set_if = "$snmp_perf$"
}
}
vars.snmp_storage_name = "^/$$"
vars.snmp_warn = 80
vars.snmp_crit = 90
vars.snmp_perf = true
}
/**
* snmp network interfaces
* Url reference: http://nagios.manubulon.com/snmp_int.html
*/
object CheckCommand "snmp-interface" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_int.pl" ]
arguments += {
"-n" = "$snmp_interface$"
"-k" = {
set_if = "$snmp_interface_perf$"
}
"-B" = {
set_if = "$snmp_interface_bits$"
}
"--64bits" = {
set_if = "$snmp_interface_64bit$"
}
"-f" = {
set_if = "$snmp_perf$"
}
}
vars.snmp_interface = "eth0"
vars.snmp_interface_perf = true
vars.snmp_interface_bits = true
vars.snmp_interface_64bit = false
vars.snmp_warn = "300,400"
vars.snmp_crit = "0,600"
vars.snmp_perf = true
}
/**
* snmp process
* Url reference: http://nagios.manubulon.com/snmp_process.html
*/
object CheckCommand "snmp-process" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_process.pl" ]
arguments += {
"-n" = {
description = "Regex service name eg. ^apache2$"
value = "$snmp_process_name$"
}
"-F" = {
set_if = "$snmp_perf$"
}
}
vars.snmp_process_name = ".*"
vars.snmp_warn = 0
vars.snmp_crit = 0
vars.snmp_perf = true
}

24
itl/manubulon Normal file
View File

@ -0,0 +1,24 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software Foundation *
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
/**
* This is the SNMP Manubulon Template Library.
*/
include "plugin-commands-manubulon.conf"