Can someone please tell me what is the most effective or preferred method for monitoring replication in MySQL. Recently, my replication stopped as a result of duplicate row found in the slave. Therefore, I would like to monitor and send out an email or alert whenever it is down.
Every so often, I would logon to MySQl and issue this command: "SHOW SLAVE STATUS". I would like to automate this process. I would like to parse the output of this command and look pertinent info such as "seconds_behind_master" < 10. If it greater than 10, then I'll send out an email saying replication is in error. Charles ******************************************** This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you. ********************************************