Munin: Plugin to monitor the Seconds_Behind_Master on mysql slave

ln -s /path/to/script /etc/munin/plugins/
/etc/init.d/munin-node restart

#!/bin/sh
# 
# Plugin to monitor the Seconds_Behind_Master of replication on a mysql slave
#
# Parameters:
# 
#       configure
#       autoconf
#
# Configuration variables
#
#       mysqlopts     - Options to pass to mysql
#
#
#%# family=auto
#%# capabilities=autoconf
 
MYSQLOPTS="$mysqlopts"
MYSQL=${mysql:-mysql}
 
if [ "$1" = "autoconf" ]; then
        $MYSQL --version 2>/dev/null >/dev/null
        if [ $? -eq 0 ]
        then

How SHOW SLAVE STATUS relates to CHANGE MASTER TO


When you’re using CHANGE MASTER TO to set start position for the slave you’re specifying position for SQL thread and so you should use Relay_Master_Log_File:Exec_Master_Log_Pos.

http://www.mysqlperformanceblog.com/2008/07/07/how-show-slave-status-rel...

Advanced MySQL Replication Techniques

http://onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.htm...

In this broader schema, water is the master of air and slave of earth, which is slave of fire; and this last is in turn slave of air, thus completing the circle. The boxed numbers next to each server indicate the server ID, which must be different for each node; the auto_increment_increment, the same for all the nodes; and the auto_increment_offset, which guarantees the uniqueness of self-generated keys.

Here is the complete setup for all nodes:

# node A - water
[mysqld]

Verify MySQL replication integrity

Запустить тест:
pt-table-checksum --no-check-replication-filters

Проверить результаты:
pt-table-checksum --no-check-replication-filters --replicate-check-only