Add logging flag for montioring plugin output
This commit is contained in:
parent
a3c31564ca
commit
bc88d764b0
|
@ -152,8 +152,8 @@ pvc:
|
||||||
log_keepalives: True
|
log_keepalives: True
|
||||||
# log_keepalive_cluster_details: Enable or disable node status logging during keepalive
|
# log_keepalive_cluster_details: Enable or disable node status logging during keepalive
|
||||||
log_keepalive_cluster_details: True
|
log_keepalive_cluster_details: True
|
||||||
# log_keepalive_storage_details: Enable or disable node storage logging during keepalive
|
# log_keepalive_plugin_details: Enable or disable node health plugin logging during keepalive
|
||||||
log_keepalive_storage_details: True
|
log_keepalive_plugin_details: True
|
||||||
# console_log_lines: Number of console log lines to store in Zookeeper per VM
|
# console_log_lines: Number of console log lines to store in Zookeeper per VM
|
||||||
console_log_lines: 1000
|
console_log_lines: 1000
|
||||||
# node_log_lines: Number of node log lines to store in Zookeeper per node
|
# node_log_lines: Number of node log lines to store in Zookeeper per node
|
||||||
|
|
|
@ -326,6 +326,7 @@ class MonitoringInstance(object):
|
||||||
|
|
||||||
def run_plugins(self):
|
def run_plugins(self):
|
||||||
total_health = 100
|
total_health = 100
|
||||||
|
if self.config["log_keepalive_plugin_details"]:
|
||||||
self.logger.out(
|
self.logger.out(
|
||||||
f"Running monitoring plugins: {', '.join([x.plugin_name for x in self.all_plugins])}",
|
f"Running monitoring plugins: {', '.join([x.plugin_name for x in self.all_plugins])}",
|
||||||
state="t",
|
state="t",
|
||||||
|
@ -340,6 +341,7 @@ class MonitoringInstance(object):
|
||||||
plugin_results.append(future.result())
|
plugin_results.append(future.result())
|
||||||
|
|
||||||
for result in sorted(plugin_results, key=lambda x: x.plugin_name):
|
for result in sorted(plugin_results, key=lambda x: x.plugin_name):
|
||||||
|
if self.config["log_keepalive_plugin_details"]:
|
||||||
self.logger.out(
|
self.logger.out(
|
||||||
result.message,
|
result.message,
|
||||||
state="t",
|
state="t",
|
||||||
|
|
|
@ -228,8 +228,8 @@ def get_configuration():
|
||||||
"log_keepalive_cluster_details": o_logging.get(
|
"log_keepalive_cluster_details": o_logging.get(
|
||||||
"log_keepalive_cluster_details", False
|
"log_keepalive_cluster_details", False
|
||||||
),
|
),
|
||||||
"log_keepalive_storage_details": o_logging.get(
|
"log_keepalive_plugin_details": o_logging.get(
|
||||||
"log_keepalive_storage_details", False
|
"log_keepalive_plugin_details", False
|
||||||
),
|
),
|
||||||
"console_log_lines": o_logging.get("console_log_lines", False),
|
"console_log_lines": o_logging.get("console_log_lines", False),
|
||||||
"node_log_lines": o_logging.get("node_log_lines", False),
|
"node_log_lines": o_logging.get("node_log_lines", False),
|
||||||
|
|
Loading…
Reference in New Issue