Обсуждение: Monitoring hot standby replication for failure

Поиск
Список
Период
Сортировка

Monitoring hot standby replication for failure

От
Mark Steben
Дата:
Good afternoon,

We are running postgres 9.4.  We are outsourcing our databases to another datacenter owned by a third party company.  The methodology we are using to move the database is hot standby log shipping replication.  We will run streaming replication for several days then, when the time comes to pull the trigger and make the move, I will complete recovery, bring in a 'production' version of postgresql.conf, restart the database, and hand it over to the apps.  

We want to make sure that during the several days of replication we are immediately notified if a problem arises - a missing log, a production outage, etc.  Is there a monitor or an 'in-the-box' procedure, or perhaps a condition to check during hot standby or streaming replication to ensure things are still running as planned, or if there is a problem?  

Thanks for any insights. 

--
Mark Steben
 Database Administrator
@utoRevenue | Autobase 
  CRM division of Dominion Dealer Solutions 
95D Ashley Ave.
West Springfield, MA 01089

t: 413.327-3045
f: 413.383-9567

www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
 www.drivedominion.com





Re: Monitoring hot standby replication for failure

От
Frank Alberto Rodriguez Solana
Дата:

Hi, you could use repmgr tool, developed by 2ndQuadrant. This work with

POtgreSQL 9.3 or higher.

In the configuration file you could use "event_notification_command" to

execute an script to monitoring and sending notifications when you needs.


This is the site:

https://repmgr.org/


And this is the documentation:

https://repmgr.org/docs/4.1/bdr-monitoring-failover.html


Greetings


El lun., 25 mar. 2019 a las 11:51, Mark Steben (<mark.steben@drivedominion.com>) escribió:
Good afternoon,

We are running postgres 9.4.  We are outsourcing our databases to another datacenter owned by a third party company.  The methodology we are using to move the database is hot standby log shipping replication.  We will run streaming replication for several days then, when the time comes to pull the trigger and make the move, I will complete recovery, bring in a 'production' version of postgresql.conf, restart the database, and hand it over to the apps.  

We want to make sure that during the several days of replication we are immediately notified if a problem arises - a missing log, a production outage, etc.  Is there a monitor or an 'in-the-box' procedure, or perhaps a condition to check during hot standby or streaming replication to ensure things are still running as planned, or if there is a problem?  

Thanks for any insights. 

--
Mark Steben
 Database Administrator
@utoRevenue | Autobase 
  CRM division of Dominion Dealer Solutions 
95D Ashley Ave.
West Springfield, MA 01089

t: 413.327-3045
f: 413.383-9567

www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
 www.drivedominion.com





Re: Monitoring hot standby replication for failure

От
"Jehan-Guillaume (ioguix) de Rorthais"
Дата:
On Mon, 25 Mar 2019 13:50:42 -0400
Mark Steben <mark.steben@drivedominion.com> wrote:

> Good afternoon,
> 
> We are running postgres 9.4.  We are outsourcing our databases to another
> datacenter owned by a third party company.  The methodology we are using to
> move the database is hot standby log shipping replication.  We will run
> streaming replication for several days then, when the time comes to pull
> the trigger and make the move, I will complete recovery, bring in a
> 'production' version of postgresql.conf, restart the database, and hand it
> over to the apps.
> 
> We want to make sure that during the several days of replication we are
> immediately notified if a problem arises - a missing log, a production
> outage, etc.  Is there a monitor or an 'in-the-box' procedure, or perhaps a
> condition to check during hot standby or streaming replication to ensure
> things are still running as planned, or if there is a problem?

You could simply use check_pgactivity to check the streaming replication delta.

Moreover, you'll be able to monitor the archiving process if you set it up.


Re: Monitoring hot standby replication for failure

От
Shreeyansh Dba
Дата:
Hi Mark,

You can used pglookout for PostgreSQL replication monitoring and failover daemon. go with below link hopes this will help you.
https://github.com/aiven/pglookout

Thanks & Regards,
Shreeyansh DBA Team
www.shreeyansh.com


On Mon, Mar 25, 2019 at 11:21 PM Mark Steben <mark.steben@drivedominion.com> wrote:
Good afternoon,

We are running postgres 9.4.  We are outsourcing our databases to another datacenter owned by a third party company.  The methodology we are using to move the database is hot standby log shipping replication.  We will run streaming replication for several days then, when the time comes to pull the trigger and make the move, I will complete recovery, bring in a 'production' version of postgresql.conf, restart the database, and hand it over to the apps.  

We want to make sure that during the several days of replication we are immediately notified if a problem arises - a missing log, a production outage, etc.  Is there a monitor or an 'in-the-box' procedure, or perhaps a condition to check during hot standby or streaming replication to ensure things are still running as planned, or if there is a problem?  

Thanks for any insights. 

--
Mark Steben
 Database Administrator
@utoRevenue | Autobase 
  CRM division of Dominion Dealer Solutions 
95D Ashley Ave.
West Springfield, MA 01089

t: 413.327-3045
f: 413.383-9567

www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
 www.drivedominion.com