Tue Oct 4 21:06:53 PDT 2005
- Previous message: [Slony1-general] Error checking
- Next message: [Slony1-general] Slony1-1.0.5 Failover does not work - replication set isn't being moved
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Oct 04, 2005 at 03:33:49PM -0400, Pascal Robert wrote: > Hi, > > I'm trying to tune the "check_slony_cluster.sh" script for Nagios to > better detect sync errors. I'm trying to understand the columns in the > 'sl_status' view. From my understanding : > > st_origin : ID of the provider > > st_received : ID of the receiver > > st_last_event : The last event ID the provider sent a SYNC > > st_last_event_ts : The last time the provider sent a SYNC > > st_last_received : The last event ID the receiver confirmed > > st_last_received_ts : The last time the receiver sent a confirmation > > st_last_received_event_ts : I don't know for this one > > st_lag_num_events : The number of events in the queue (unconfirmed > events in sl_event) > > st_lag_time : The time between now and the last confirmation > > > So if I want to see if any events are not confirmed by the receiver, I > should check the difference between 'st_last_received_ts' and > 'st_last_event_ts', and I had to be sure that both 'st_last_event' and > 'st_last_received' are the same ? I've been working on something like this. Here is a query that will tell you the age in minutes of the last confirmed event for each set on the current node: SELECT (date_part('epoch'::text, now() - c.con_timestamp) / 60::double precision)::integer AS age, c.con_origin FROM _testcluster.sl_confirm c WHERE (c.con_seqno, c.con_origin, c.con_received) IN (SELECT MAX(c.con_seqno), c.con_origin, getlocalnodeid('_testcluster') FROM _testcluster.sl_confirm c, _testcluster.sl_subscribe s WHERE c.con_origin = s.sub_provider AND s.sub_receiver = getlocalnodeid('_testcluster') GROUP BY c.con_origin); -- Tim Goodaire 416-673-4126 tgoodair at ca.afilias.info Database Administrator, Afilias Canada Corp. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20051004/6b84813c/attachment.bin
- Previous message: [Slony1-general] Error checking
- Next message: [Slony1-general] Slony1-1.0.5 Failover does not work - replication set isn't being moved
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list