[icinga-checkins] icinga.org: icinga2/feature/add-check_ipmi_sensor-checkcommand-8414: Add check command "ipmi-sensor"

git at icinga.org git at icinga.org
Sun Feb 22 07:01:02 CET 2015


Module: icinga2
Branch: feature/add-check_ipmi_sensor-checkcommand-8414
Commit: ff413d42607a07bea28228274110c40c612e4bc8
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=ff413d42607a07bea28228274110c40c612e4bc8

Author: Tobias von der Krone <tobias.vonderkrone at profitbricks.com>
Date:   Sat Feb 21 22:08:04 2015 +0100

Add check command "ipmi-sensor"

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

refs #8414

---

 doc/7-icinga-template-library.md     |   26 +++++++++++
 itl/plugins-contrib.d/CMakeLists.txt |    2 +-
 itl/plugins-contrib.d/ipmi.conf      |   82 ++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 1 deletion(-)

diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md
index 2a6fd53..af5636a 100644
--- a/doc/7-icinga-template-library.md
+++ b/doc/7-icinga-template-library.md
@@ -928,6 +928,32 @@ The Plugins contrib collects various contributed command definitions.
 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.
 
+## <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
 
 This category includes all plugins for various network components like routers, switches and firewalls.
diff --git a/itl/plugins-contrib.d/CMakeLists.txt b/itl/plugins-contrib.d/CMakeLists.txt
index 12e5be6..ff19049 100644
--- a/itl/plugins-contrib.d/CMakeLists.txt
+++ b/itl/plugins-contrib.d/CMakeLists.txt
@@ -16,6 +16,6 @@
 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 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
 )
diff --git a/itl/plugins-contrib.d/ipmi.conf b/itl/plugins-contrib.d/ipmi.conf
new file mode 100644
index 0000000..f8cf383
--- /dev/null
+++ b/itl/plugins-contrib.d/ipmi.conf
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * 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"
+
+	command = [ PluginsContribDir + "/check_ipmi_sensor" ]
+
+	arguments = {
+		"-H" = {
+            value = "$ipmi_address$"
+            description = "Hostname or ip address of the IPMI interface (default: host.address)"
+		}
+		"-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 = "$address$"
+	vars.ipmi_protocal_lan_version = "LAN_2_0"
+}



More information about the icinga-checkins mailing list