Don't crash if there are no thresolds
Signed-off-by: Sven Velt <sven@velt.de>
This commit is contained in:
parent
4e909d694f
commit
3714bd8fcd
|
@ -93,7 +93,10 @@ class MonitoringPlugin(object):
|
||||||
|
|
||||||
|
|
||||||
def value_in_range(self, value, range):
|
def value_in_range(self, value, range):
|
||||||
(low, high, negate) = self.range_to_limits(range)
|
if range not in ['', None]:
|
||||||
|
(low, high, negate) = self.range_to_limits(range)
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
if value < low or value > high:
|
if value < low or value > high:
|
||||||
result = False
|
result = False
|
||||||
|
|
Loading…
Reference in a new issue