Module: check_mk
Branch: master
Commit: c702b770c12b9e1d09899177efce0c9bcc75ff43
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c702b770c12b9e…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Jan 22 15:17:00 2016 +0100
Now really added the files
---
checkman/dell_eql_storage | 18 ++++++++
checks/dell_eql_storage | 104 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 122 insertions(+)
diff --git a/checkman/dell_eql_storage b/checkman/dell_eql_storage
new file mode 100644
index 0000000..61d2712
--- /dev/null
+++ b/checkman/dell_eql_storage
@@ -0,0 +1,18 @@
+title: Dell Equallogic SAN Storage
+agents: snmp
+catalog: hw/storagehw/dell
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the Health- and Raid State on Dell Equallogic SAN Storages.
+ It also shows the total and used space and show how many space is used for snapshots or
for replication.
+
+
+item:
+ The Name of the Member Device
+
+inventory:
+ One service will be created for each member
+
+perfdata:
+ The size and used space of the device
diff --git a/checks/dell_eql_storage b/checks/dell_eql_storage
new file mode 100644
index 0000000..4858bf6
--- /dev/null
+++ b/checks/dell_eql_storage
@@ -0,0 +1,104 @@
+#!/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_dell_eql_storage(info):
+ for line in info:
+ yield line[0], {}
+
+def check_dell_eql_storage(item, _no_params, info):
+ for name, desc, health_state, raid_state, total_storage, \
+ repl_storage, snap_storage, used_storage in info:
+ if name == item:
+ yield 0, desc
+
+ # Health Status:
+ health_states = {
+ "0" : "Unknown",
+ "1" : "Normal",
+ "2" : "Warning",
+ "3" : "Critical",
+ }
+ if health_state == "1":
+ state = 0
+ elif health_state in [ "2", "0" ]:
+ state = 1
+ else:
+ state = 2
+ yield state, "Health State: %s" % health_states[health_state]
+
+ # Raid Status
+ raid_states = {
+ "1" : "Ok",
+ "2" : "Degraded",
+ "3" : "Verifying",
+ "4" : "Reconstructing",
+ "5" : "Failed",
+ "6" : "CatastrophicLoss",
+ "7" : "Expanding",
+ "8" : "Mirroring",
+ }
+
+ if raid_state == "1":
+ state = 0
+ elif raid_state in [ "3", "4", "7",
"8"]:
+ state = 1
+ else:
+ state = 2
+ yield state, "Raid State: %s" % raid_states[raid_state]
+
+ # Storage
+ total_bytes = int(total_storage) * 1048576
+ used_bytes = int(used_storage) * 1048576
+ repl_bytes = int(repl_storage) * 1048576
+ snap_bytes = int(snap_storage) * 1048576
+ perfdata = [("fs_used", used_bytes),("fs_size",
total_bytes)]
+ yield 0, "Used: %s/%s (Snapshots: %s, Replication: %s)" % \
+ (get_bytes_human_readable(used_bytes), \
+ get_bytes_human_readable(total_bytes),\
+ get_bytes_human_readable(snap_bytes),\
+ get_bytes_human_readable(repl_bytes)),\
+ perfdata
+
+
+
+check_info["dell_eql_storage"] = {
+ "check_function" : check_dell_eql_storage,
+ "inventory_function" : inventory_dell_eql_storage,
+ "service_description" : "Storage %s",
+ "has_perfdata" : True,
+ "snmp_scan_function" : lambda oid: "EQL-SUP" in
oid(".1.3.6.1.2.1.1.1.0"),
+ "snmp_info" : (".1.3.6.1.4.1.12740.2.1", [
+ "1.1.9.1", #eqlMemberName
+ "1.1.7.1", #eqlMemberDescription
+ "5.1.1.1", #eqlMemberHealthStatus
+ "13.1.1.1", #eqlMemberRaidStatus
+ "10.1.1.1", #eqlMemberTotalStorage
+ "10.1.4.1", #eqlMemberReplStorage
+ "10.1.3.1", #eqlMemberSnapStorage
+ "10.1.2.1", #eqlMemberUsedStorage
+ ]),
+}
+