Module: check_mk
Branch: master
Commit: d671a1165d77601a13ce9d13f1b30e6e1877e112
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d671a1165d7760…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Tue Oct 23 16:32:50 2012 +0200
FIX: if check doesn't check warn/crit error levels if they're set to None
---
checks/if.include | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/if.include b/checks/if.include
index e088cd9..4bc4e0d 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -304,10 +304,10 @@ def check_if_common(item, params, info):
if errperc > 0:
infotext += ", %s-errors: %.2f%%" % (what,
errperc)
- if errperc >= err_crit:
+ if err_crit != None and errperc >= err_crit:
state = 2
infotext += "(!!) >= " + str(err_crit)
- elif errperc >= err_warn:
+ elif err_warn != None and errperc >= err_warn:
state = max(state, 1)
infotext += "(!) >= " + str(err_warn)