[Bucardo-general] Monitoring Stats / bucardo_rrd
Greg Sabino Mullane
greg at endpoint.com
Sat May 18 04:19:01 UTC 2013
On Fri, May 17, 2013 at 03:51:49PM +0100, Mike Tonks wrote:
> I'm not certain the lag time is measured correctly. If bucardo is
> stopped then the most recent delta should give a good metric, but if
> bucardo is running I'm not sure how to do this.
I'm not sure the code is doing the right thing. This looks good:
select count(*) from $delta_table where txntime
not in (select txntime from $track_table);
Note that you should be considering bucardo_delta_targets as well,
but that can be overlooked on the first round. Or ignored, if
we simply want to count a row as done if it went *somewhere*.
See for example line 1826 of bucardo.schema in HEAD (or grep
for "Are older than the first argument interval")
Then:
SELECT round(extract( epoch from current_timestamp -
(SELECT MAX(txntime) AS delta_ts FROM $delta_table) ))
Wouldn't you want min(txntime) of the unprocessed ones?
--
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Digital signature
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130518/ce1fc3d4/attachment.sig>
More information about the Bucardo-general
mailing list