Module: check_mk
Branch: master
Commit: d68bf2c8628bc018af900b991ed7b93bb36583b0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d68bf2c8628bc0…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Wed May 21 14:09:01 2014 +0200
FIX df.include: failed for checks with grouping patterns
df checks did fail when using filesystems grouping patterns. Now fixed.
---
.werks/958 | 9 +++++++++
ChangeLog | 1 +
checks/df.include | 6 +++---
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/958 b/.werks/958
new file mode 100644
index 0000000..8dbdead
--- /dev/null
+++ b/.werks/958
@@ -0,0 +1,9 @@
+Title: df.include: failed for checks with grouping patterns
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1400674014
+Class: fix
+
+df checks did fail when using filesystems grouping patterns. Now fixed.
+
diff --git a/ChangeLog b/ChangeLog
index acecb10..f7003d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,6 +80,7 @@
* 0969 FIX: blade_health: correctly output error message in non-OK state
* 0611 FIX: nfsexports.solaris: fix in determination of path prefix
* 0953 FIX: brocade_mlx_temp: special treatment for devices sometimes not delivering
temperature by SNMP
+ * 0958 FIX: df.include: failed for checks with grouping patterns...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
diff --git a/checks/df.include b/checks/df.include
index 9141868..7b0b4ff 100644
--- a/checks/df.include
+++ b/checks/df.include
@@ -252,8 +252,8 @@ def df_check_filesystem_list(item, params, fslist_blocks,
fslist_inodes = None):
total_blocks_size = 0
total_blocks_avail = 0
total_inodes = 0
- total_inodse_avail = 0
- for idx, (mp, size_mb, avail_mb) in enumerate(fslist_block):
+ total_inodes_avail = 0
+ for idx, (mp, size_mb, avail_mb) in enumerate(fslist_blocks):
for pattern in patterns:
if fnmatch.fnmatch(mp, pattern):
count += 1
@@ -268,7 +268,7 @@ def df_check_filesystem_list(item, params, fslist_blocks,
fslist_inodes = None):
if count == 0:
return (3, "No filesystem matching the patterns")
else:
- status, infotext, perfdata = df_check_filesystem_single(g_hostname, item,
total_size, total_avail, params)
+ status, infotext, perfdata = df_check_filesystem_single(g_hostname, item,
total_blocks_size, total_blocks_avail, total_inodes, total_inodes_avail, params)
infotext += " (%d filesystems)" % count
return status, infotext, perfdata
else: