An increase in replication lag between master and slave databases can result in data inconsistency and synchronization delays, impacting application functionality, user experience and recovery objectives. The playbook assists in identifying the cause of this increase to mitigate its impact.
systemctl status mysql
ssh $REPLICA_IP "mysql -u ${USERNAME} -p${PASSWORD} -e 'SHOW SLAVE STATUS\G' | grep -E 'Slave_IO_Running|Slave_SQL_Running'"
df -h
tail -n 100 /var/log/mysql/error.log
tail -n 100 /var/log/syslog