Module: check_mk
Branch: master
Commit: 9ea132479a9e0afc68561aacaa76e07646b89466
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ea132479a9e0a…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Jan 31 12:56:04 2014 +0100
emc_isilon.nodehealth: new check for EMC Isilon Storage systems: NodeHealth
---
.werks/698 | 8 ++++++++
ChangeLog | 1 +
checkman/emc_isilon.nodehealth | 16 ++++++++++++++++
checks/emc_isilon | 37 ++++++++++++++++++++++++++++++++++---
4 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/.werks/698 b/.werks/698
new file mode 100644
index 0000000..67d7cda
--- /dev/null
+++ b/.werks/698
@@ -0,0 +1,8 @@
+Title: emc_isilon.nodehealth: new check for EMC Isilon Storage systems: NodeHealth
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1391169308
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index a41518b..265c049 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -77,6 +77,7 @@
* 0574 if64: check now supports clustering...
* 0576 fileinfo.groups: new feature to include current date in file pattern
* 0130 Support of new Firmware version of various Fujitsu Sotarge Systems
+ * 0698 emc_isilon.nodehealth: new check for EMC Isilon Storage systems: NodeHealth
* 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.nodehealth b/checkman/emc_isilon.nodehealth
new file mode 100644
index 0000000..9899d2f
--- /dev/null
+++ b/checkman/emc_isilon.nodehealth
@@ -0,0 +1,16 @@
+title: EMC Isilon: NodeHealth
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Checks the NodeHealth (Overall Status) of an EMC Isilon Storage
+ Node 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 Node, named
+ Node Health
+
diff --git a/checks/emc_isilon b/checks/emc_isilon
index e04d971..5ea4548 100644
--- a/checks/emc_isilon
+++ b/checks/emc_isilon
@@ -24,9 +24,12 @@
# 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
+emc_isilon_info = [(".1.3.6.1.4.1.12124.1.1", [1, # clusterName
+ 2, # clusterHealth
+ 5, # configuredNodes
+ 6]), # onlineNodes
+ (".1.3.6.1.4.1.12124.2.1", [1, # nodeName
+ 2]), # nodeHealth
]
def emc_isilon_scan(oid):
@@ -59,6 +62,34 @@ check_info["emc_isilon.clusterhealth"] = {
}
#.
+# .--NodeHealth------------------------------------------------------.
+
+def inventory_emc_isilon_nodehealth(info):
+ return [(None, None)]
+
+def check_emc_isilon_nodehealth(item, _no_params, info):
+ status=int(info[1][0][1])
+ statusmap = ("ok", "attn", "down",
"invalid")
+ nodename=info[1][0][0]
+ if status >= len(statusmap):
+ return 3, "nodeHealth reports unidentified status %s" % status
+ else:
+ if status == 0:
+ rc = 0
+ else:
+ rc = 2
+ return rc, "nodeHealth for %s reports status %s" % (nodename,
statusmap[status])
+
+check_info["emc_isilon.nodehealth"] = {
+ "check_function" : check_emc_isilon_nodehealth,
+ "inventory_function" : inventory_emc_isilon_nodehealth,
+ "service_description" : "Node Health",
+ "has_perfdata" : False,
+ "snmp_info" : emc_isilon_info,
+ "snmp_scan_function" : emc_isilon_scan
+}
+
+#.
# .--Nodes------------------------------------------------------.
def inventory_emc_isilon_nodes(info):