Module: check_mk
Branch: master
Commit: b9d64568fc919a82aa3397f583987a00ce7ca496
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b9d64568fc919a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 20 11:50:45 2016 +0200
3808 FIX df.include: fixed incorrect levels calculations on very small filesystems
Filesystems with <tt>Free space left</tt> levels less than 1MB were
incorrectly calculated.
The check always reported CRIT in this scenario.
---
.werks/3808 | 11 +++++++++++
ChangeLog | 1 +
checks/df.include | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/3808 b/.werks/3808
new file mode 100644
index 0000000..428ba30
--- /dev/null
+++ b/.werks/3808
@@ -0,0 +1,11 @@
+Title: df.include: fixed incorrect levels calculations on very small filesystems
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1474364904
+Class: fix
+
+Filesystems with <tt>Free space left</tt> levels less than 1MB were
incorrectly calculated.
+The check always reported CRIT in this scenario.
+
diff --git a/ChangeLog b/ChangeLog
index 0b3f494..a7cbf6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -398,6 +398,7 @@
* 3746 FIX: tinkerforge: Keep check from crashing in case of unconfigured params
* 3862 FIX: mknotifyd mknotifyd.connection: New service description (when
enabled)...
* 3807 FIX: mssql_counters: fixed crash when the check is unable to parse a timestamp
provided by the plugin
+ * 3808 FIX: df.include: fixed incorrect levels calculations on very small
filesystems...
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/df.include b/checks/df.include
index 8e0f5de..c9bfdee 100644
--- a/checks/df.include
+++ b/checks/df.include
@@ -321,7 +321,7 @@ def df_check_filesystem_single(hostname, mountpoint, size_mb,
avail_mb, reserved
get_percent_human_readable(used_perc), used_hr, size_hr)
status = 0
- if warn_mb <= -1:
+ if warn_mb < 0:
# Negative levels, so calculate MB left
rest_mb = size_mb - used_mb
crit_mb = crit_mb * -1