From: Karl Denninger <karl@denninger.net>
To: richter@simkorp.com.br
Cc: pgsql-general@postgresql.org
Subject: Re: Async replication: how to get an alert on failure
Date: Wed, 01 Aug 2012 22:22:41 -0500
Message-ID: <5019F281.8070109@denninger.net> (raw)
In-Reply-To: <5019ADE5.4050800@simkorp.com.br>
References: <5019ADE5.4050800@simkorp.com.br>
On 8/1/2012 5:29 PM, Edson Richter wrote:
> I have few PostgreSQL servers established with replication.
> Now, is there any way to receive an e-mail in case of error during
> synchronization?
> I mean, is there an script I can run (maybe every 5 minutes) that will
> check if replication is stolen, and send an e-mail in case of failure?
>
> Thanks,
> --
I wrote a small program that goes to each of the servers in the
replication group and checks its status on the log, computes the
difference, and if off by more than "X" bytes prints a notification.
If this is run from the cron it will remain silent unless the offset is
breached at which point it will emit an email to the submitting owner of
the job.
--
-- Karl Denninger
/The Market Ticker ®/ <http://market-ticker.org;
Cuda Systems LLC
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: karl@denninger.net, richter@simkorp.com.br
Subject: Re: Async replication: how to get an alert on failure
In-Reply-To: <5019F281.8070109@denninger.net>
References: <5019ADE5.4050800@simkorp.com.br> <5019F281.8070109@denninger.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox