mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2024-11-22 18:33:49 +01:00
fixed expansion on newly merged command line args
This commit is contained in:
parent
18b0898e72
commit
823fc275c9
@ -206,10 +206,16 @@ class JsonRuleProcessor:
|
|||||||
self.key_threshold_critical = self.expandKeys(
|
self.key_threshold_critical = self.expandKeys(
|
||||||
self.rules.key_threshold_critical)
|
self.rules.key_threshold_critical)
|
||||||
self.key_value_list = self.expandKeys(self.rules.key_value_list)
|
self.key_value_list = self.expandKeys(self.rules.key_value_list)
|
||||||
|
self.key_value_list_not = self.expandKeys(
|
||||||
|
self.rules.key_value_list_not)
|
||||||
self.key_list = self.expandKeys(self.rules.key_list)
|
self.key_list = self.expandKeys(self.rules.key_list)
|
||||||
self.key_value_list_critical = self.expandKeys(
|
self.key_value_list_critical = self.expandKeys(
|
||||||
self.rules.key_value_list_critical)
|
self.rules.key_value_list_critical)
|
||||||
|
self.key_value_list_not_critical = self.expandKeys(
|
||||||
|
self.rules.key_value_list_not_critical)
|
||||||
self.key_list_critical = self.expandKeys(self.rules.key_list_critical)
|
self.key_list_critical = self.expandKeys(self.rules.key_list_critical)
|
||||||
|
self.key_value_list_unknown = self.expandKeys(
|
||||||
|
self.rules.key_value_list_unknown)
|
||||||
|
|
||||||
def expandKeys(self, src):
|
def expandKeys(self, src):
|
||||||
if src is None:
|
if src is None:
|
||||||
@ -302,8 +308,8 @@ class JsonRuleProcessor:
|
|||||||
failure += self.checkThresholds(self.key_threshold_warning)
|
failure += self.checkThresholds(self.key_threshold_warning)
|
||||||
if self.key_value_list is not None:
|
if self.key_value_list is not None:
|
||||||
failure += self.checkEquality(self.key_value_list)
|
failure += self.checkEquality(self.key_value_list)
|
||||||
if self.rules.key_value_list_not is not None:
|
if self.key_value_list_not is not None:
|
||||||
failure += self.checkNonEquality(self.rules.key_value_list_not)
|
failure += self.checkNonEquality(self.key_value_list_not)
|
||||||
if self.key_list is not None:
|
if self.key_list is not None:
|
||||||
failure += self.checkExists(self.key_list)
|
failure += self.checkExists(self.key_list)
|
||||||
return failure
|
return failure
|
||||||
@ -314,16 +320,16 @@ class JsonRuleProcessor:
|
|||||||
failure += self.checkThresholds(self.key_threshold_critical)
|
failure += self.checkThresholds(self.key_threshold_critical)
|
||||||
if self.key_value_list_critical is not None:
|
if self.key_value_list_critical is not None:
|
||||||
failure += self.checkEquality(self.key_value_list_critical)
|
failure += self.checkEquality(self.key_value_list_critical)
|
||||||
if self.rules.key_value_list_not_critical is not None:
|
if self.key_value_list_not_critical is not None:
|
||||||
failure += self.checkNonEquality(self.rules.key_value_list_not_critical)
|
failure += self.checkNonEquality(self.key_value_list_not_critical)
|
||||||
if self.key_list_critical is not None:
|
if self.key_list_critical is not None:
|
||||||
failure += self.checkExists(self.key_list_critical)
|
failure += self.checkExists(self.key_list_critical)
|
||||||
return failure
|
return failure
|
||||||
|
|
||||||
def checkUnknown(self):
|
def checkUnknown(self):
|
||||||
unknown = ''
|
unknown = ''
|
||||||
if self.rules.key_value_list_unknown is not None:
|
if self.key_value_list_unknown is not None:
|
||||||
unknown += self.checkEquality(self.rules.key_value_list_unknown)
|
unknown += self.checkEquality(self.key_value_list_unknown)
|
||||||
return unknown
|
return unknown
|
||||||
|
|
||||||
def checkMetrics(self):
|
def checkMetrics(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user