Module: check_mk
Branch: master
Commit: a35eb81cbbdf421c03a0d97a8ff2b469eed14beb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a35eb81cbbdf42…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 27 16:28:37 2011 +0200
FIX: printer_supply: fix Perf-O-Meter if no max known
---
ChangeLog | 1 +
web/plugins/perfometer/check_mk.py | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bc93ec8..2e30def 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,7 @@
Checks & Agents:
* FIX: mk_oracle now also detects XE databases
* FIX: printer_alerts: handle 0-entries of Brother printers
+ * FIX: printer_supply: fix Perf-O-Meter if no max known
Multisite:
* FIX: finally fixed long-wanted "NagStaMon create hundreds
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index a836fff..1d113c5 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -330,6 +330,8 @@ def perfometer_check_mk_printer_supply(row, check_command,
perf_data):
crit = float(perf_data[0][4])
mini = float(perf_data[0][5])
maxi = float(perf_data[0][6])
+ if maxi < 0:
+ return "", "" # Printer does not supply a max value
# If there is no 100% given, calculate the percentage
if maxi != 100.0: