Module: check_mk
Branch: master
Commit: 86697ed309af9cc60558c86152f98be438a09bdf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=86697ed309af9c…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Nov 28 18:16:13 2013 +0100
liebert_chiller_status: New check for Liebert Chiller devices
---
.werks/101 | 8 +++++++
ChangeLog | 14 ++-----------
checkman/liebert_chiller_status | 9 ++++++++
checks/liebert_chiller_status | 44 +++++++++++++++++++++++++++++++++++++++
4 files changed, 63 insertions(+), 12 deletions(-)
diff --git a/.werks/101 b/.werks/101
new file mode 100644
index 0000000..3f401d1
--- /dev/null
+++ b/.werks/101
@@ -0,0 +1,8 @@
+Title: liebert_chiller_status: New check for Liebert Chiller devices
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1385658944
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 495e69d..024feab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,9 +23,9 @@
* 0070 cmciii_lcp_airin cmciii_lcp_airout cmciii_lcp_fans cmciii_lcp_waterflow
cmciii_lcp_waterin cmciii_lcp_waterout: new checks for the Rittal CMC-III LCP device
* 0098 apc_inrow_airflow, apc_inrow_fanspeed, apc_inrow_temp: New checks for APC
inrow devices
* 0099 apc_mod_pdu_modules: New check for APC Modular Power Distribution Unit
- * 0100 juniper_cpu: New check for CPU utilization on Juniper switches
- * 0070 cmciii_lcp_airin cmciii_lcp_airout cmciii_lcp_fans cmciii_lcp_waterflow
cmciii_lcp_waterin cmciii_lcp_waterout: new checks for the Rittal CMC-III LCP device
* 0072 cmciii_pu_access cmciii_pu_canbus cmciii_pu_io cmciii_pu_temp: New checks for
the Rittal CMC-III PU Unit
+ * 0100 juniper_cpu: New check for CPU utilization on Juniper switches
+ * 0101 liebert_chiller_status: New check for Liebert Chiller devices
* 0024 FIX: cisco_wlc: removed check configuration parameter ap_model...
* 0065 FIX: veeam_client: check behaviour improved when backup is in progress
* 0066 FIX: veeam_jobs: check behaviour improved when backup is in progress
@@ -95,16 +95,6 @@
* 0233 FIX: Fixed missing entries in log file and availability view...
- * 0026 FIX: snmptd_mkevent.py: fixed crash on startup
- * 0036 FIX: fixed bug in multisite command execution...
-
- Livestatus:
- * 0067 livedump: new option to mark the mode at the beginning of the dump and
documentation fixes...
- * 0023 FIX: Fixed incorrect starttime of table statehist entries...
- * 0034 FIX: Availability no longer showes incorrect entries when only one logfile
exists...
- * 0233 FIX: Fixed missing entries in log file or availability view...
-
-
1.2.3i6:
Core & Setup:
* 0041 FIX: setup.py now handles non existing wwwuser gracefully...
diff --git a/checkman/liebert_chiller_status b/checkman/liebert_chiller_status
new file mode 100644
index 0000000..dbc072a
--- /dev/null
+++ b/checkman/liebert_chiller_status
@@ -0,0 +1,9 @@
+title: Liebert Chiller
+agents: snmp
+catalog: hw/environment
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the current state of a Liebert Chiller Device
+ It will returns {CRIT} if device is in an not OK state
+
diff --git a/checks/liebert_chiller_status b/checks/liebert_chiller_status
new file mode 100644
index 0000000..75e5b52
--- /dev/null
+++ b/checks/liebert_chiller_status
@@ -0,0 +1,44 @@
+#!/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_liebhert_chiller_status(info):
+ return [(None,None)]
+
+def check_liebhert_chiller_status(_no_item, _no_params, info):
+ status = info[0][0]
+ if status not in [ "5", "7" ]:
+ return 2, "Device is in a non OK state"
+ return 0, "Device is in a OK state"
+
+
+check_info["liebhert_chiller_status"] = {
+ "check_function" : check_liebhert_chiller_status,
+ "inventory_function" : inventory_liebhert_chiller_status,
+ "service_description" : "Chiller status",
+ "has_perfdata" : False,
+ "snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.476.1.42.4.3.20"),
+ "snmp_info" : (".1.3.6.1.4.1.476.1.42.4.3.20.1.1.20",
[ 2 ])
+}