Module: check_mk
Branch: master
Commit: c2ab83d35666ffab99e551a3fc8bb692ddd4dcf4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c2ab83d35666ff…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Feb 17 16:20:54 2014 +0100
esx_vsphere_counters.diskio: now also shows disk latency
---
.werks/556 | 8 ++++++++
ChangeLog | 1 +
checks/esx_vsphere_counters | 9 ++++++---
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/556 b/.werks/556
new file mode 100644
index 0000000..378740a
--- /dev/null
+++ b/.werks/556
@@ -0,0 +1,8 @@
+Title: esx_vsphere_counters.diskio: now also shows disk latency
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1392650420
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index b66d930..1931758 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -90,6 +90,7 @@
* 0701 emc_isilon_diskstatus: new check for Status of Disks in EMC Isilon Storage
Systems
* 0581 emc_datadomain_disks emc_datadomain_fs: new checks to monitor disks and
filesystems of EMC Datadomain
* 0718 logwatch.ec: Optionally monitor the list of forwarded logfiles...
+ * 0556 esx_vsphere_counters.diskio: now also shows disk latency
* 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/checks/esx_vsphere_counters b/checks/esx_vsphere_counters
index 58f7385..89941be 100644
--- a/checks/esx_vsphere_counters
+++ b/checks/esx_vsphere_counters
@@ -77,6 +77,7 @@ def inventory_esx_vsphere_counters_diskio(info):
def check_esx_vsphere_counters_diskio(_no_item, _no_params, info):
reads = 0
writes = 0
+ latency = 0
for counter, item, value, unit in info:
if item == '':
if counter == 'disk.read':
@@ -87,10 +88,12 @@ def check_esx_vsphere_counters_diskio(_no_item, _no_params, info):
reads += int(value)
elif counter == 'disk.numberWrite':
writes += int(value)
+ elif counter == 'disk.deviceLatency':
+ latency = max(latency, int(value))
- return 0, "%s/sec read, %s/sec write, IOs: %.2f/sec" % (
- get_bytes_human_readable(read_bytes), get_bytes_human_readable(write_bytes),
reads + writes,), \
- [ ("read", read_bytes), ("write", write_bytes),
("ios", reads + writes) ]
+ return 0, "%s/sec read, %s/sec write, IOs: %.2f/sec, latency: %d ms" % (
+ get_bytes_human_readable(read_bytes), get_bytes_human_readable(write_bytes),
reads + writes, latency), \
+ [ ("read", read_bytes), ("write", write_bytes),
("ios", reads + writes), ("latency" , latency) ]
check_info['esx_vsphere_counters.diskio'] = {