Module: check_mk
Branch: master
Commit: 4bc8a6d0024f8de29f659b9adadfe299c40a8b3b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4bc8a6d0024f8d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 22 11:25:18 2015 +0200
#2211 netapp_api_disk.summary: output physical size of broken disks as an additional
information
---
.werks/2211 | 9 +++++++++
ChangeLog | 1 +
checks/netapp_api_disk | 2 ++
3 files changed, 12 insertions(+)
diff --git a/.werks/2211 b/.werks/2211
new file mode 100644
index 0000000..04ebea1
--- /dev/null
+++ b/.werks/2211
@@ -0,0 +1,9 @@
+Title: netapp_api_disk.summary: output physical size of broken disks as an additional
information
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1429694699
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 7b0ef1f..cbfcae9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -166,6 +166,7 @@
* 2115 bluenet_meter: new check to monitor energy and power related parameters of
Bachmann Bluenet PDUs
* 2205 check_icmp: new option for pinging the host alias or an explicity address...
* 2210 check_bi_aggr: new option for honoring downtimes and acknowledgements...
+ * 2211 netapp_api_disk.summary: output physical size of broken disks as an additional
information
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checks/netapp_api_disk b/checks/netapp_api_disk
index a7001e5..66ac334 100644
--- a/checks/netapp_api_disk
+++ b/checks/netapp_api_disk
@@ -103,6 +103,8 @@ def check_netapp_api_disk_summary(_no_item, params, info):
info = []
for disk in disks:
disk_info = "Serial: %s" % disk.get("serial-number")
+ if "physical-space" in disk:
+ disk_info += ", Size: %s" %
get_bytes_human_readable(int(disk["physical-space"]))
shelf_uid = find_disk_shelf_uid(disk.get("disk-uid"))
if shelf_uid:
disk_info += " (Shelf: %s, Bay %s)" % (shelf_uid,
disk.get("bay"))