Add more debugging info to psql

This commit is contained in:
Joshua Boniface 2023-12-07 21:36:05 -05:00
parent ddd9d9ee07
commit 82a7fd3c80
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ class MonitoringPluginScript(MonitoringPlugin):
_, stdout, _ = run_os_command("patronictl --config-file /etc/patroni/config.yml list --format json") _, stdout, _ = run_os_command("patronictl --config-file /etc/patroni/config.yml list --format json")
patronictl_status = jloads(stdout) patronictl_status = jloads(stdout)
this_node_patronictl_status = [p for p in patronictl_status if p["Member"] == self.this_node.name][0] 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") self.logger.out(f"{this_node_patronictl_status}, last node state: {self.last_coordinator_state}, current node state: {coordinator_state}", state="d")
# Invalid state, nothing returned; this is a fault # Invalid state, nothing returned; this is a fault
if health_delta == 0 and not this_node_patronictl_status: if health_delta == 0 and not this_node_patronictl_status: