Replication Monitoring

Hi Team,

How do we monitor the replication status between two cross data center clusters.?
Do we have any table/veiw which actually stores the current replication status of the database I know we have tables where we have data to check ‘is_dr, primary,sec. etc’ but would like to know the status in case of replication has some issues.??

Regards,
Chaitanya

Hi,

We use the following query to look at our replication status and alert of any backlog:-

select DATABASE_NAME,PRIMARY_URI,PRIMARY_STATE AS p_state,SECONDARY_URI,SECONDARY_STATE AS s_state,LSN_LAG,VOLUME_LAG_MB,REPLICATION_THROUGHPUT_MBPS,ESTIMATED_CATCHUP_TIME_S
from information_schema.mv_aggregated_replication_status
WHERE SECONDARY_URI IS NOT NULL

Internally, we capture these stats to a timeseries to chart out replication speed/lag

Regards,
Nick

1 Like

Hi Nick,

Thank you for the reply. it really helps.

Challenging part is will be once the primary is down the mv_aggregated_replication_status table values are gone and becomes difficult to automate the failover from primary to secondary cluster.