Module: check_mk
Branch: master
Commit: d1cd00bf71386da5698b01444eca8e46dd5fa7f8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d1cd00bf71386d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 27 10:31:07 2017 +0200
5426 FIX df perfometer: Fixed exception when maximum value is not available
Change-Id: I85b5658daa097956a39e04f1a2c0f97f0758229c
---
.werks/5426 | 11 +++++++++++
web/plugins/perfometer/check_mk.py | 3 +++
2 files changed, 14 insertions(+)
diff --git a/.werks/5426 b/.werks/5426
new file mode 100644
index 0000000..1e77b27
--- /dev/null
+++ b/.werks/5426
@@ -0,0 +1,11 @@
+Title: df perfometer: Fixed exception when maximum value is not available
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1509092934
+
+
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 0dce660..85ebe7d 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -1145,6 +1145,9 @@ def perfometer_check_mk_df(row, check_command, perf_data):
hours_left = float(data[1])
break
+ if not maxx:
+ return "", ""
+
perc_used = 100 * (float(value) / float(maxx))
perc_free = 100 - float(perc_used)