[pgpool-general: 8519] Best source for replication delay metrics?
Jordan Hurwich
jhurwich at pulsasensors.com
Fri Dec 16 08:50:49 JST 2022
Hi everyone,
What is the best way to get the current replication delay to each backend?
In particular I'd like to write a script that checks PGPool's understanding
of the replication delay to each backend every ~5-10s and uploads that to
Datadog, our infrastructure monitoring service; and I could use some advice
on the best way to get that data.
The two places I've considered are:
1. "replication_delay" shown from SHOW POOL_NODES
- but I often see 0 for the backends here and am not sure if that
means the delay is actually currently 0 or just unknown
2. scraping the log lines produced with the log_standby_delay = 'always'
setting
- these are almost always greater than 0, even when SHOW POOL_NODES says
0, so my guess is this is a more accurate source
- but I'd prefer something that I can query on-demand, rather than
having to scrape the logs
Please let me know if either of those seem best, or if there's something I
haven't considered. Thanks,
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20221215/104a30c1/attachment.htm>
More information about the pgpool-general
mailing list