Module: check_mk
Branch: master
Commit: d0ca4eff720c2dd011b16a86d329fc5d3b0b9b0c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0ca4eff720c2d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri May 27 13:24:32 2016 +0200
3578 FIX df: Fixed exception when monitoring filesystems without inode infos
---
.werks/3578 | 10 ++++++++++
ChangeLog | 1 +
checks/df | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/3578 b/.werks/3578
new file mode 100644
index 0000000..5fc2cb8
--- /dev/null
+++ b/.werks/3578
@@ -0,0 +1,10 @@
+Title: df: Fixed exception when monitoring filesystems without inode infos
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1464348249
+
+
diff --git a/ChangeLog b/ChangeLog
index bd45b15..7092265 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -237,6 +237,7 @@
* 3613 FIX: Fix vertical scaling of graph for disk utilization from 0...1% to
0...100%
* 3577 FIX: Solaris agent: Fixed performance issue introduced with #3389
* 3623 FIX: ipmi: fixed discrete sensor discovery if sensor is disabled
+ * 3578 FIX: df: Fixed exception when monitoring filesystems without inode infos
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/df b/checks/df
index 59ad58b..a3dffe1 100644
--- a/checks/df
+++ b/checks/df
@@ -126,7 +126,7 @@ def check_df(item, params, info):
used_mb = int(line[3]) / 1024.0
reserved_mb = size_mb - avail_mb - used_mb # reserved for root
fslist_blocks.append((mountpoint, size_mb, avail_mb, reserved_mb))
- if df_inodes:
+ if df_inodes and len(df_inodes) > idx:
fslist_inodes.append((mountpoint, int(df_inodes[idx][2]),
int(df_inodes[idx][4])))
return df_check_filesystem_list(item, params, fslist_blocks, fslist_inodes)