20150714

How to send you an email with your mysql slave seconds behind master value

It's dead simple, just schedule a crontab with this line:

mysql -u root -p -e "show slave status \G"|grep Seconds | mail -s "Seconds behind master"


This will query the slave status, grep the most important line and send you an email.

Hope this help

No hay comentarios: