Module: check_mk
Branch: master
Commit: 51c65f1fbe15fd043bcf164475e79c79ff0b5dc1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=51c65f1fbe15fd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 20 10:39:18 2013 +0200
FIX: diskstat: Fixed wrong values for IO/s computation on linux hosts
Conflicts:
ChangeLog
---
ChangeLog | 2 ++
checks/diskstat | 22 +++++++++++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4aa9efe..dbf9419 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -366,6 +366,8 @@
* FIX: zpool_status: Ignoring "No known data errors" text
* FIX: dmi_sysinfo: Handling ":" in value correctly
* FIX: check_http: Fixed syntax error when monitoring certificates
+ * FIX: check_dns: parameter -A does not get an additional string
+ * FIX: diskstat: Fixed wrong values for IO/s computation on linux hosts
Multisite:
* FIX: LDAP: Disabling use of referrals in active directory configuration
diff --git a/checks/diskstat b/checks/diskstat
index d390e7a..84d3039 100644
--- a/checks/diskstat
+++ b/checks/diskstat
@@ -115,9 +115,25 @@ def diskstat_rewrite_device(nameinfo, linestart):
def linux_diskstat_convert(info):
info, nameinfo = diskstat_parse_info(info)
- rewritten = [ ( diskstat_rewrite_device(nameinfo, l[0:3]), int(l[5]), int(l[9]),
- int(l[6]), int(l[10]), int(l[12])) for l in info[1:]
- if len(l) >= 13 ]
+ # The generic function takes the following values per line:
+ # 0: devname
+ # 1: read bytes counter
+ # 2: write bytes counter
+ # Optional ones:
+ # 3: number of reads
+ # 4: number of writes
+ # 5: timems
+ # 6: read queue length *counters*
+ # 7: write queue length *counters*
+ rewritten = [
+ ( diskstat_rewrite_device(nameinfo, l[0:3]),
+ int(l[5]),
+ int(l[9]),
+ int(l[3]),
+ int(l[7]),
+ int(l[12])
+ ) for l in info[1:] if len(l) >= 13
+ ]
# Remove device mapper devices without a translated name
return [ line for line in rewritten if not line[0].startswith("dm-") ]