From 160bed997d6ee9dea30b0a8b76346d0fa0202ed4 Mon Sep 17 00:00:00 2001 From: Jeff Frost Date: Mon, 17 Feb 2014 20:08:24 -0500 Subject: [PATCH] Add an ORDER BY to the slony_status check to account for cases in which there is more than one node in replication; we want to report on the most lagged server. --- check_postgres.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check_postgres.pl b/check_postgres.pl index fae344f66..73a99c1e4 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -7421,7 +7421,8 @@ q{SELECT COALESCE(n2.no_comment, '') AS com2 FROM SCHEMA.sl_status JOIN SCHEMA.sl_node n1 ON (n1.no_id=st_origin) -JOIN SCHEMA.sl_node n2 ON (n2.no_id=st_received)}; +JOIN SCHEMA.sl_node n2 ON (n2.no_id=st_received) +ORDER BY 1 DESC}; my $maxlagtime = -1; -- 2.30.2