Add check command "ipmi-sensor"

Add the check command "ipmi-sensor" in plugings-contrib and its documentation.

fixes #8414
This commit is contained in:
Tobias von der Krone 2015-02-21 22:08:04 +01:00
parent aac53c1dd1
commit f69f69bb7c
3 changed files with 110 additions and 1 deletions

View File

@ -928,6 +928,32 @@ The Plugins contrib collects various contributed command definitions.
These check commands assume that the global constant named `PluginsContribDir` These check commands assume that the global constant named `PluginsContribDir`
is set to the path where the user installs custom plugins and can be enabled by uncommenting the corresponding line in icinga2.conf. is set to the path where the user installs custom plugins and can be enabled by uncommenting the corresponding line in icinga2.conf.
## <a id="plugins-contrib-ipmi"></a> IPMI Devices
This category includes all plugins for IPMI devices.
### <a id="plugins-contrib-command-ipmi-sensor"></a> ipmi-sensor
With the plugin `ipmi-sensor` provided by <a href="https://www.thomas-krenn.com/">Thomas-Krenn.AG</a> you can monitor sensor data for IPMI devices. See https://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Monitoring_Plugin for installation and configuration instructions.
Custom Attributes:
Name | Description
---------------------------------|-----------------------------------------------------------------------------------------------------
ipmi_address | **Required.** Specifies the remote host (IPMI device) to check. Defaults to "$address$".
ipmi_config_file | **Optional.** Path to the FreeIPMI configuration file. It should contain IPMI username, IPMI password, and IPMI privilege-level.
ipmi_username | **Optional.** The IPMI username.
ipmi_password | **Optional.** The IPMI password.
ipmi_privilege_level | **Optional.** The IPMI privilege level of the IPMI user.
ipmi_backward_compatibility_mode | **Optional.** Enable backward compatibility mode, useful for FreeIPMI 0.5.* (this omits FreeIPMI options "--quiet-cache" and "--sdr-cache-recreate").
ipmi_sensor_type | **Optional.** Limit sensors to query based on IPMI sensor type. Examples for IPMI sensor types are 'Fan', 'Temperature' and 'Voltage'.
ipmi_exclude_sensor_id | **Optional.** Exclude sensor matching ipmi_sensor_id.
ipmi_sensor_id | **Optional.** Include sensor matching ipmi_sensor_id.
ipmi_protocal_lan_version | **Optional.** Change the protocol LAN version. Defaults to "LAN_2_0".
ipmi_number_of_active_fans | **Optional.** Number of fans that should be active. Otherwise a WARNING state is returned.
ipmi_show_fru | **Optional.** Print the product serial number if it is available in the IPMI FRU data.
ipmi_no_sel_checking | **Optional.** Turn off system event log checking via ipmi-sel.
## <a id="plugins-contrib-network-components"></a> Network Components ## <a id="plugins-contrib-network-components"></a> Network Components
This category includes all plugins for various network components like routers, switches and firewalls. This category includes all plugins for various network components like routers, switches and firewalls.

View File

@ -16,6 +16,6 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
install( install(
FILES network-components.conf operating-system.conf virtualization.conf FILES ipmi.conf network-components.conf operating-system.conf virtualization.conf
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include/plugins-contrib.d DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include/plugins-contrib.d
) )

View File

@ -0,0 +1,83 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2015 Icinga Development Team (https://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. *
******************************************************************************/
object CheckCommand "ipmi-sensor" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginsContribDir + "/check_ipmi_sensor" ]
arguments = {
"-H" = {
value = "$ipmi_address$"
description = "Hostname or ip address of the IPMI interface (default: host.address or host.address6)"
}
"-f" = {
value = "$ipmi_config_file$"
description = "Path to the FreeIPMI configuration file"
}
"-U" = {
value = "$ipmi_username$"
description = "Username to connect with"
}
"-P" = {
value = "$ipmi_password$"
description = "Password to use"
}
"-L" = {
value = "$ipmi_privilege_level$"
description = "Privilege level of the user"
}
"-b" = {
set_if = "$ipmi_backward_compatibility_mode$"
description = "Enable backward compatibility mode (for FreeIPMI 0.5.*)"
}
"-T" = {
value = "$ipmi_sensor_type$"
description = "Limit sensors to query based on IPMI sensor type (seperated by comma)"
}
"-x" = {
value = "$ipmi_sensor_id$"
description = "Exclude sensor matching ipmi_sensor_id"
}
"-i" = {
value = "$ipmi_exclude_sensor_id$"
description = "Include sensor matching ipmi_sensor_id"
}
"-D" = {
value = "$ipmi_protocal_lan_version$"
description = "Change the protocol LAN version (default: LAN_2_0)"
}
"-fc" = {
value = "$ipmi_number_of_active_fans$"
description = "Number of fans that should be active"
}
"--fru" = {
set_if = "$ipmi_show_fru$"
description = "Print the product serial number got by ipmi-fru"
}
"--nosel" = {
set_if = "$ipmi_no_sel_checking$"
description = "Turn off system event log checking via ipmi-sel"
}
}
vars.ipmi_address = "$check_address$"
vars.ipmi_protocal_lan_version = "LAN_2_0"
}