[checkmk-commits] Check_MK Git: check_mk: FIX: if check does no longer report BW errors if no levels are set

git version control git at mathias-kettner.de
Tue Nov 20 11:37:11 CET 2012


Module: check_mk
Branch: master
Commit: e9b95715079cde6f9c3ea235aa96712ebc552c7b
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e9b95715079cde6f9c3ea235aa96712ebc552c7b

Author: Florian Heigl <fh at mathias-kettner.de>
Date:   Tue Nov 20 11:36:56 2012 +0100

FIX: if check does no longer report BW errors if no levels are set

---

 checks/if.include |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/checks/if.include b/checks/if.include
index 882120c..b61c6dd 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -300,10 +300,10 @@ def check_if_common(item, params, info):
                         traffic = traffic_avg # apply levels to average traffic
 
                     # Check bandwidth thresholds
-                    if not bw_crit is None and traffic * unit_multiplier >= bw_crit:
+                    if bw_crit != None and traffic * unit_multiplier >= bw_crit:
                         state = 2
                         infotext += ' (!!) >= ' + get_human_readable(bw_crit / unit_multiplier) + "/s"
-                    elif not bw_warn is None and traffic * unit_multiplier >= bw_warn:
+                    elif bw_warn != None and traffic * unit_multiplier >= bw_warn:
                         state = max(state, 1)
                         infotext += ' (!) >= ' + get_human_readable(bw_warn / unit_multiplier) + "/s"
 



More information about the checkmk-commits mailing list