Add Patroni output to debug logs

This commit is contained in:
Joshua Boniface 2023-12-07 14:00:35 -05:00
parent bf158dc2d9
commit 157b8c20bf
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class MonitoringPluginScript(MonitoringPlugin):
_, stdout, _ = run_os_command("patronictl --config-file /etc/patroni/config.yml list --format json")
patronictl_status = jloads(stdout)
this_node_patronictl_status = [p for p in patronictl_status if p["Member"] == self.this_node.name][0]
self.logger.out(f"{this_node_patronictl_status}", state="d")
if health_delta == 0 and not this_node_patronictl_status:
health_delta = 10