Fix bugs if plugins fail to load

This commit is contained in:
2023-02-13 21:45:33 -05:00
parent 7378affcb5
commit 54373c5bec
2 changed files with 18 additions and 4 deletions

View File

@ -52,9 +52,15 @@ def getNodeInformation(zkhandler, node_name):
node_running_domains = zkhandler.read(("node.running_domains", node_name)).split()
try:
node_health = int(zkhandler.read(("node.monitoring.health", node_name)))
except ValueError:
except Exception:
node_health = "N/A"
node_health_plugins = zkhandler.read(("node.monitoring.plugins", node_name)).split()
try:
node_health_plugins = zkhandler.read(
("node.monitoring.plugins", node_name)
).split()
except Exception:
node_health_plugins = list()
node_health_details = list()
for plugin in node_health_plugins:
plugin_last_run = zkhandler.read(