Avoid failures if no children found
This commit is contained in:
parent
fdda47e8a2
commit
570da99605
|
@ -317,18 +317,20 @@ class MonitoringInstance(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Clean up any old plugin data for which a plugin file no longer exists
|
# Clean up any old plugin data for which a plugin file no longer exists
|
||||||
for plugin_key in self.zkhandler.children(
|
plugins_data = self.zkhandler.children(
|
||||||
("node.monitoring.data", self.this_node.name)
|
("node.monitoring.data", self.this_node.name)
|
||||||
):
|
)
|
||||||
if plugin_key not in self.all_plugin_names:
|
if plugins_data is not None:
|
||||||
self.zkhandler.delete(
|
for plugin_key in plugins_data:
|
||||||
(
|
if plugin_key not in self.all_plugin_names:
|
||||||
"node.monitoring.data",
|
self.zkhandler.delete(
|
||||||
self.this_node.name,
|
(
|
||||||
"monitoring_plugin",
|
"node.monitoring.data",
|
||||||
plugin_key,
|
self.this_node.name,
|
||||||
|
"monitoring_plugin",
|
||||||
|
plugin_key,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
def run_plugin(self, plugin):
|
def run_plugin(self, plugin):
|
||||||
time_start = datetime.now()
|
time_start = datetime.now()
|
||||||
|
|
Loading…
Reference in New Issue