Module: check_mk
Branch: master
Commit: 9f27166f44dc70406fda9b10ed6965cdfb94f305
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f27166f44dc70…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Tue Dec 17 16:03:06 2013 +0100
emc_isilon: New checks for EMC Isilon Storage System
---
.werks/317 | 8 +++
ChangeLog | 1 +
checkman/emc_isilon.clusterhealth | 16 ++++++
checkman/emc_isilon.names | 10 ++++
checkman/emc_isilon.nodes | 14 +++++
checks/emc_isilon | 102 ++++++++++++++++++++++++++++++++++++
modules/catalog.py | 1 +
web/plugins/perfometer/check_mk.py | 1 +
8 files changed, 153 insertions(+)
diff --git a/.werks/317 b/.werks/317
new file mode 100644
index 0000000..ba0e70b
--- /dev/null
+++ b/.werks/317
@@ -0,0 +1,8 @@
+Title: emc_isilon: New checks for EMC Isilon Storage System
+Level: 2
+Component: checks
+Version: 1.2.5i1
+Date: 1387292523
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index a50f947..1434da0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
* 0316 hitachi_hnas_cpu: New check for CPU utilization of Hitachi HNAS devices
* 0373 wut_webtherm: Supporting several other devices now
* 0377 check_http: Certificate Age mode now supports SNI...
+ * 0317 emc_isilon: New checks for EMC Isilon Storage System
* 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/emc_isilon.clusterhealth b/checkman/emc_isilon.clusterhealth
new file mode 100644
index 0000000..8e2d432
--- /dev/null
+++ b/checkman/emc_isilon.clusterhealth
@@ -0,0 +1,16 @@
+title: EMC Isilon: ClusterHealth
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Checks the ClusterHealth (Overall Status) of an EMC Isilon Storage
+ System as reported by SNMP.
+
+ Returns {OK} on status ok, {CRIT} on status attn, down or invalid
+ and {UNKN} on every other status.
+
+inventory:
+ Finds exactly one service on each EMC Isilon System, named
+ Cluster Health
+
diff --git a/checkman/emc_isilon.names b/checkman/emc_isilon.names
new file mode 100644
index 0000000..c84b123
--- /dev/null
+++ b/checkman/emc_isilon.names
@@ -0,0 +1,10 @@
+title: EMC Isilon: Report Cluster and Node Name
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+silon Infodistribution: check_mk
+description:
+ Reports the Cluster and Node Name. This Check always returns {OK}.
+
+inventory:
+ Finds exactly one service on each EMC Isilon System, named Isilon Info.
diff --git a/checkman/emc_isilon.nodes b/checkman/emc_isilon.nodes
new file mode 100644
index 0000000..058cba0
--- /dev/null
+++ b/checkman/emc_isilon.nodes
@@ -0,0 +1,14 @@
+title: EMC Isilon: Online Status of Nodes
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Checks the Online Status of Nodes in an EMC Isilon Storage System.
+
+ Returns {OK} if all configured nodes are listed as online nodes
+ and {CRIT} otherwise.
+
+inventory:
+ Finds exactly one service on each EMC Isilon System, named Nodes.
+
diff --git a/checks/emc_isilon b/checks/emc_isilon
new file mode 100644
index 0000000..e04d971
--- /dev/null
+++ b/checks/emc_isilon
@@ -0,0 +1,102 @@
+#!/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.
+
+emc_isilon_info = [(".1.3.6.1.4.1.12124.1.1", [1, 2, 5, 6]),
+ # clusterName, clusterHealth, configuredNodes, onlineNodes
+ (".1.3.6.1.4.1.12124.2.1", [1]), # nodeName
+ ]
+
+def emc_isilon_scan(oid):
+ return
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.12124.1")
+
+# .--ClusterHealth------------------------------------------------------.
+
+def inventory_emc_isilon_clusterhealth(info):
+ return [(None, None)]
+
+def check_emc_isilon_clusterhealth(item, _no_params, info):
+ status=int(info[0][0][1])
+ statusmap = ("ok", "attn", "down",
"invalid")
+ if status >= len(statusmap):
+ return 3, "ClusterHealth reports unidentified status %s" % status
+ else:
+ if status == 0:
+ rc = 0
+ else:
+ rc = 2
+ return rc, "ClusterHealth reports status %s" % statusmap[status]
+
+check_info["emc_isilon.clusterhealth"] = {
+ "check_function" : check_emc_isilon_clusterhealth,
+ "inventory_function" : inventory_emc_isilon_clusterhealth,
+ "service_description" : "Cluster Health",
+ "has_perfdata" : False,
+ "snmp_info" : emc_isilon_info,
+ "snmp_scan_function" : emc_isilon_scan
+}
+
+#.
+# .--Nodes------------------------------------------------------.
+
+def inventory_emc_isilon_nodes(info):
+ return [(None, None)]
+
+def check_emc_isilon_nodes(item, _no_params, info):
+ cluster_name, cluster_health, configured_nodes, online_nodes = info[0][0]
+ if configured_nodes == online_nodes:
+ rc = 0
+ else:
+ rc = 2
+ return rc, "Configured Nodes: %s / Online Nodes: %s" % (configured_nodes,
online_nodes)
+
+check_info["emc_isilon.nodes"] = {
+ "check_function" : check_emc_isilon_nodes,
+ "inventory_function" : inventory_emc_isilon_nodes,
+ "service_description" : "Nodes",
+ "has_perfdata" : False,
+ "snmp_info" : emc_isilon_info,
+ "snmp_scan_function" : emc_isilon_scan
+}
+
+#.
+# .--Cluster- and Node Name-------------------------------------------.
+
+def inventory_emc_isilon_names(info):
+ return [(None, None)]
+
+def check_emc_isilon_names(item, _no_params, info):
+ return 0, "Cluster Name is %s, Node Name is %s" % (info[0][0][0],
info[1][0][0])
+
+check_info["emc_isilon.names"] = {
+ "check_function" : check_emc_isilon_names,
+ "inventory_function" : inventory_emc_isilon_names,
+ "service_description" : "Isilon Info",
+ "has_perfdata" : False,
+ "snmp_info" : emc_isilon_info,
+ "snmp_scan_function" : emc_isilon_scan
+}
+
+#.
diff --git a/modules/catalog.py b/modules/catalog.py
index 7c546c5..6cbd5f0 100644
--- a/modules/catalog.py
+++ b/modules/catalog.py
@@ -30,6 +30,7 @@ manpage_catalog_titles = {
"mcdata" : "McDATA",
"netapp" : "NetApp",
"hitachi" : "Hitachi",
+ "emc" : "EMC",
"phone" : "Telephony",
"app" : "Applications",
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 2abf9db..dca0387 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -430,6 +430,7 @@ perfometers["check_mk-cisco_cpu"] =
perfometer_cpu_utilization
perfometers["check_mk-juniper_cpu"] = perfometer_cpu_utilization
perfometers["check_mk-brocade_mlx.module_cpu"] = perfometer_cpu_utilization
perfometers["check_mk-hitachi_hnas_cpu"] = perfometer_cpu_utilization
+perfometers["check_mk-hr_cpu"] = perfometer_cpu_utilization
def perfometer_ps_perf(row, check_command, perf_data):
perf_dict = dict([(p[0], float(p[1])) for p in perf_data])