Module: check_mk
Branch: master
Commit: ce9634b7d03f87d538b1e48f4a1ca853bc7095ab
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ce9634b7d03f87…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jul 4 09:14:13 2018 +0200
Added some TODOs
Change-Id: I88f6817b053c564633a39a00f5fd7ac86e034048
---
checks/aix_diskiod | 19 +++++++++++++++++++
checks/diskstat.include | 4 ++--
checks/hpux_lunstats | 19 +++++++++++++++++++
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/checks/aix_diskiod b/checks/aix_diskiod
index d43af17..78e21c0 100644
--- a/checks/aix_diskiod
+++ b/checks/aix_diskiod
@@ -45,6 +45,25 @@
# 6. Kb_wrtn -> Kilobytes written since system boot
def aix_diskiod_convert(info):
+ #TODO use 'check_diskstat_dict' which needs the following format
+ # disks = { "sda" : {
+ # 'node' : None,
+ # 'average_read_request_size' : 0.0,
+ # 'average_read_wait' : 0.0,
+ # 'average_request_size' : 40569.90476190476,
+ # 'average_wait' : 0.761904761904762,
+ # 'average_write_request_size' : 40569.90476190476,
+ # 'average_write_wait' : 0.0007619047619047619,
+ # 'read_ios' : 0.0,
+ # 'read_throughput' : 0.0,
+ # 'latency' : 0.00038095238095238096,
+ # 'utilization' : 0.0006153846153846154,
+ # 'write_ios' : 1.6153846153846154,
+ # 'write_throughput' : 65536.0,
+ # 'queue_length' : 0.0,
+ # 'read_ql' : 0.0,
+ # 'write_ql' : 0.0,
+ # }}
converted = []
for node_info, device, tm_act, kbps, tps, kb_read, kb_written in info:
converted.append((node_info, device, int(kb_read) * 1024, int(kb_written) *
1024))
diff --git a/checks/diskstat.include b/checks/diskstat.include
index 53c9aa8..779f245 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -221,7 +221,7 @@ def check_diskstat_line(this_time, item, params, line,
mode='sectors'):
def check_diskstat_generic(item, params, this_time, info, mode='sectors'):
# legacy version if item is "read" or "write"
if item in [ 'read', 'write' ]:
- return check_diskstat_old(item, params, this_time, info)
+ return _check_diskstat_old(item, params, this_time, info)
# Sum up either all physical disks (if item is "SUMMARY") or
# all entries matching the item in question. It is not a bug if
@@ -251,7 +251,7 @@ def check_diskstat_generic(item, params, this_time, info,
mode='sectors'):
# This is the legacy version of diskstat as used in <= 1.1.10.
# We keep it here for a while in order to be compatible with
# old installations.
-def check_diskstat_old(item, params, this_time, info):
+def _check_diskstat_old(item, params, this_time, info):
# sum up over all devices
if item == 'read':
index = 2 # sectors read
diff --git a/checks/hpux_lunstats b/checks/hpux_lunstats
index 36b4c4c..a76addc 100644
--- a/checks/hpux_lunstats
+++ b/checks/hpux_lunstats
@@ -51,6 +51,25 @@ check_includes['hpux_lunstats'] = [
"diskstat.include" ]
# Convert info to output needed for generic diskstat check
def hpux_lunstats_convert(info):
+ #TODO use 'check_diskstat_dict' which needs the following format
+ # disks = { "sda" : {
+ # 'node' : None,
+ # 'average_read_request_size' : 0.0,
+ # 'average_read_wait' : 0.0,
+ # 'average_request_size' : 40569.90476190476,
+ # 'average_wait' : 0.761904761904762,
+ # 'average_write_request_size' : 40569.90476190476,
+ # 'average_write_wait' : 0.0007619047619047619,
+ # 'read_ios' : 0.0,
+ # 'read_throughput' : 0.0,
+ # 'latency' : 0.00038095238095238096,
+ # 'utilization' : 0.0006153846153846154,
+ # 'write_ios' : 1.6153846153846154,
+ # 'write_throughput' : 65536.0,
+ # 'queue_length' : 0.0,
+ # 'read_ql' : 0.0,
+ # 'write_ql' : 0.0,
+ # }}
luns = []
for line in info:
if len(line) == 2: