Module: check_mk
Branch: master
Commit: 8200391d1a0dd837255bab1dc569c4545fb34db6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8200391d1a0dd8…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Feb 18 17:05:19 2013 +0100
diskstat.include: fixed crash with mysql check
---
ChangeLog | 1 +
checks/diskstat.include | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a1ee131..fd6307c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@
* Linux agent: limit netstat to 10 seconds
* ps: Allow %1, %2, .. instead of %s in process_inventory. That allows
reordering of matched groups
+ * mysql: fixed crash on computing IO information
BI:
* FIX: fixed invalid links to hosts and services in BI tree view
diff --git a/checks/diskstat.include b/checks/diskstat.include
index 37da609..758f04f 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -131,7 +131,7 @@ def check_diskstat_line(this_time, item, params, line):
perfdata = [ perfdata[0], perfdata[2], perfdata[1], perfdata[3] ]
# Process IOs when available
- if line[3] >= 0 and line[4] > 0:
+ if len(line) >= 5 and line[3] >= 0 and line[4] > 0:
reads, writes = map(int, line[3:5])
ios = reads + writes
timedif, ios_per_sec = get_counter(countername + ".ios", this_time,
ios)