From 1b84553405c7e45c8bd1ea060e934fd4167fe59e Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 7 Dec 2023 11:19:26 -0500 Subject: [PATCH] Use passed coordinator state --- health-daemon/plugins/psql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/health-daemon/plugins/psql b/health-daemon/plugins/psql index a2333b68..909ccce2 100644 --- a/health-daemon/plugins/psql +++ b/health-daemon/plugins/psql @@ -112,12 +112,13 @@ class MonitoringPluginScript(MonitoringPlugin): elif health_delta == 0 and this_node_patronictl_status["State"] != "running": health_delta = 10 - message = "Patroni PostgreSQL state us not running" + message = "Patroni PostgreSQL state is not running" # Handle some exceptional cases if health_delta > 0: - if self.this_node.coordinator_state in ["takeover", "relinquish"]: + if coordinator_state in ["takeover", "relinquish"]: # This scenario occurrs if this plugin run catches a node transitioning from primary to secondary coordinator + # We can ignore it. health_delta = 0 message = "Patroni PostgreSQL error reported but currently transitioning coordinator state; ignoring."