Script to Monitor Replication
Monday, February 9th, 2009Since I sometimes get replication problem, so I make several script to check replication automatically and report to me:
To check replication status when I in the console and playing with replication configuration or when I have nothing to do yet I want to see a black screen
monitorreplication.sh
#!/bin/bash
while [ 1 ]
do
# Your code goes here
echo ""
date
echo "=============================="
mysql -u backup -pmysqlback -e "show slave status\G;"
# Modify sleep time (in seconds) as needed below
sleep 10
done
Another scripts to send replication status via email
(more…)