Re: Monitoring Replication

From: "Mahlon E(dot) Smith" <mahlon(at)martini(dot)nu>
To: Brandon Phelps <bphelps(at)gls(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Monitoring Replication
Date: 2011-10-12 20:28:42
Message-ID: 20111012202841.GB59310@martini.nu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 12, 2011, Brandon Phelps wrote:

> I use Nagios to monitor various things on a few servers and have
> recently set up a hot-standby server and would obviously like to
> include the state of streaming replication in my monitoring.
>
> [...]
>
> The confusion I have is how exactly can I determine just how far
> behind the replication is during loads? Currently with no traffic
> (servers not in production yet) sent_location on the master is
> "A/10018560" and pg_last_xlog_receive_location() on the standby also
> returns "A/10018560"... How far apart can these be for me to start
> worrying? I could make a bit more sense of all this if they were
> simple timestamps or something, but the hex values returned boggle my
> mind.
>
> Any advice on these issues or other tips on monitoring the replication
> would be greatly appreciated.

Brandon: I'm using this script for Mon, you should be able to adapt it
to whatever language and monitoring system you please.

http://www.martini.nu/misc/db_replication.monitor.txt

--
Mahlon E. Smith
http://www.martini.nu/contact.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2011-10-12 20:29:35 Re: link-spam (was Re: [GENERAL] 7)
Previous Message Rich Shepard 2011-10-12 20:21:13 Re: psql died in midst of session [FIXED]