Module: check_mk
Branch: master
Commit: ab2b8c9363d15bf525a1ae0a3e18f5704be02fd6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab2b8c9363d15b…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jul 11 15:56:32 2014 +0200
FIX diskstat: fixed performance data of old legacy disk IO read/write data
When diskstat is configured to have seperate checks for read and write IO,
counter values instead of rates were taken as performance data. This
is fixed now.
---
.werks/633 | 10 ++++++++++
ChangeLog | 1 +
checks/diskstat.include | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/633 b/.werks/633
new file mode 100644
index 0000000..4430053
--- /dev/null
+++ b/.werks/633
@@ -0,0 +1,10 @@
+Title: diskstat: fixed performance data of old legacy disk IO read/write data
+Level: 1
+Component: core
+Version: 1.2.5i5
+Date: 1405086851
+Class: fix
+
+When diskstat is configured to have seperate checks for read and write IO,
+counter values instead of rates were taken as performance data. This
+is fixed now.
diff --git a/ChangeLog b/ChangeLog
index 4b4f3d8..37de5fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
* 0174 FIX: Fixed appending of --keepalive-fd parameters to checkhelpers...
* 1053 FIX: Fixed events check always being reporting OK state...
* 1045 FIX: Gracefully restart check_mk helpers in case of memory leak...
+ * 0633 FIX: diskstat: fixed performance data of old legacy disk IO read/write
data...
Checks & Agents:
* 0168 f5_bigip_pool: Added Wato configuration...
diff --git a/checks/diskstat.include b/checks/diskstat.include
index 0afe294..08b909e 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -238,5 +238,6 @@ def check_diskstat_old(item, params, this_time, info):
timedif, per_sec = get_counter("diskstat." + item, this_time, this_val)
mb_per_s = per_sec / 2048.0 # Diskstat output is in sectors a 512 Byte
- perfdata = [ (item, "%dc" % this_val ) ]
+ kb_per_s = per_sec / 2.0
+ perfdata = [ (item, "%f" % kb_per_s ) ]
return (0, "%.1fMB/s (in last %d secs)" % (mb_per_s, timedif), perfdata)