Module: check_mk
Branch: master
Commit: 8f22e40118fa844d413e8d1d1352be70c356ee5c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8f22e40118fa84…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Tue Mar 25 11:57:22 2014 +0100
kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
---
.werks/598 | 8 +++++++
ChangeLog | 6 ++---
checkman/kentix_humidity | 13 ++++++++++
checkman/kentix_temp | 13 ++++++++++
checks/kentix_humidity | 59 ++++++++++++++++++++++++++++++++++++++++++++++
checks/kentix_temp | 59 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 155 insertions(+), 3 deletions(-)
diff --git a/.werks/598 b/.werks/598
new file mode 100644
index 0000000..73f8552
--- /dev/null
+++ b/.werks/598
@@ -0,0 +1,8 @@
+Title: kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1395744987
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index d7c3284..cc2d53a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -121,11 +121,11 @@
* 0595 dell_chassis_power, dell_chassis_powersupplies: new checks for Dell Poweredge
Chassis Ppower consumption...
* 0596 dell_chassis_status, dell_chassis_temp, dell_chassis_kvm, dell_chassis_io,
dell_chassis_fans: new checks to monitor the overall status of various sections of the
Dell Poweredge Chassis via CMC
* 0597 dell_chassis_slots: new check to monitor the status of the blade slots of the
Dell Poweredge Blade Servers
- * 0145 apc_symmetra: Changed naming of Batterie Temperature to System Temerature...
- NOTE: Please refer to the migration notes!
* 0759 check_notify_count: New active check to monitor the number of notifications
sent to contacts...
* 0760 The windows agent contains meta information about version, manufacturer
etc....
->>>>>>> 309bc055d22c0013242e9c3787049fbd6afb6ff1
+ * 0145 apc_symmetra: Changed naming of Batterie Temperature to System Temerature...
+ NOTE: Please refer to the migration notes!
+ * 0598 kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checkman/kentix_humidity b/checkman/kentix_humidity
new file mode 100644
index 0000000..8fa5874
--- /dev/null
+++ b/checkman/kentix_humidity
@@ -0,0 +1,13 @@
+title: Kentix MultiSensor-RACK: Humidity Sensor
+agents: snmp
+catalog: hw/server/kentix
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the humidity measured by the Kentix MultiSensor-RACK device.
+
+ No limits are set in the check, since limits are configured in the device
+ itself. These limits are taken as the lower and upper warning levels of the check.
+
+perfdata:
+ One variable: the humidity
diff --git a/checkman/kentix_temp b/checkman/kentix_temp
new file mode 100644
index 0000000..5cbb478
--- /dev/null
+++ b/checkman/kentix_temp
@@ -0,0 +1,13 @@
+title: Kentix MultiSensor-RACK: Temperature Sensor
+agents: snmp
+catalog: hw/server/kentix
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the temperature measured by the Kentix MultiSensor-RACK device.
+
+ No limits are set in the check, since limits are configured in the device
+ itself. These limits are taken as the lower and upper warning levels of the check.
+
+perfdata:
+ One variable: the temperature
diff --git a/checks/kentix_humidity b/checks/kentix_humidity
new file mode 100644
index 0000000..a47edec
--- /dev/null
+++ b/checks/kentix_humidity
@@ -0,0 +1,59 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk 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 in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+def inventory_kentix_humidity(info):
+ if info:
+ return [ (None, None ) ]
+
+def check_kentix_humidity(_no_item, _no_params, info):
+ value, lower_warn, upper_warn, alarm, text = info[0]
+ temp = float(value)/10
+ perfdata = [ ("temp", temp, lower_warn+":"+upper_warn ) ]
+ upper_warn = float(upper_warn)
+ lower_warn = float(lower_warn)
+ infotext = "%.1f%% (min/max at %.1f%%/%.1f%%)" % (temp, lower_warn,
upper_warn)
+ if temp >= upper_warn or temp <= lower_warn:
+ state = 1
+ infotext = "%s: %s" % (text, infotext)
+ else:
+ state = 0
+ return state, infotext, perfdata
+
+check_info["kentix_humidity"] = {
+ 'check_function': check_kentix_humidity,
+ 'inventory_function': inventory_kentix_humidity,
+ 'service_description': 'Humidity',
+ 'has_perfdata': True,
+ 'snmp_info': ('.1.3.6.1.4.1.37954.3.1.2',
+ ['1', # humidityValue
+ '2', # humidityMin
+ '3', # humidityMax
+ '4', # humidityAlarm, not used
+ '5', # humidityAlarmtext
+ ]
+ ),
+ "snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.332.11.6"),
+}
diff --git a/checks/kentix_temp b/checks/kentix_temp
new file mode 100644
index 0000000..d3bd2df
--- /dev/null
+++ b/checks/kentix_temp
@@ -0,0 +1,59 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk 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 in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+def inventory_kentix_temp(info):
+ if info:
+ return [ (None, None ) ]
+
+def check_kentix_temp(_no_item, _no_params, info):
+ value, lower_warn, upper_warn, alarm, text = info[0]
+ temp = float(value)/10
+ perfdata = [ ("temp", temp, lower_warn+":"+upper_warn ) ]
+ upper_warn = float(upper_warn)
+ lower_warn = float(lower_warn)
+ infotext = "%.1f C (min/max at %.1f/%.1f C)" % (temp, lower_warn,
upper_warn)
+ if temp >= upper_warn or temp <= lower_warn:
+ state = 1
+ infotext = "%s: %s" % (text, infotext)
+ else:
+ state = 0
+ return state, infotext, perfdata
+
+check_info["kentix_temp"] = {
+ 'check_function': check_kentix_temp,
+ 'inventory_function': inventory_kentix_temp,
+ 'service_description': 'Temperature',
+ 'has_perfdata': True,
+ 'snmp_info': ('.1.3.6.1.4.1.37954.3.1.1',
+ ['1', # temperatureValue
+ '2', # temperatureMin
+ '3', # temperatureMax
+ '4', # temperatureAlarm, not used here
+ '5', # temperatureAlarmtext
+ ]
+ ),
+ "snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.332.11.6"),
+}