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

User tags

tzdata lstat virtualbox cpanm fido7 rtsp sublime lts etch virt-install htop shellshock sysctl su perl MegaRAID source tiger HTTPS apt SYN centos 7 firefox ansible usb .htaccess storage ubuntu lenny gtk qcow2 arping fail2ban bind pam dhcp iops xhost iSCSI DRBD php pulseaudio opcontrol video cache chroot vim ddos lubuntu freedos find cluster HDFS dhclient top mdadm newgrp dpkg sysresccd puppet opreport groups CPAN iostat noop regex perlbrew backup deb numa SSD build APU hotplug vrrpd sysfs PXE mkfs gre iptables ipmitool taskset debian ardour in-addr.arpa SpamAssassin dovecot quagga language tar tin munin ulimit gdb xfs nginx bug git replication iowait Swift raid5 proxy alien exim virsh CentOS raid xargs ip security erase routing core dump backtrace limit_conn nfs4 rpm mount mariadb 3Ware cpu usage slab route glusterfs kernel KVM mysql java performance wget grub bridge ha keyboard conntrack sysrq search rkhunter fio ipmi ps OpenSSL chromium sg SuperMicro qemu bscan leap second vlan pacemaker LVM oprofile pvmove tun soa dns lxc exim4 equalizer Areca openvpn X forwarding cgroups idmapd hdparm docker-compose youtube arch squeeze vtysh Adaptec shorewall tftp netfilter nvidia parallel sftp xen glxinfo dstat PTR docker radeon debootstrap corosync /etc/network/interfaces apache bacula boot arp RT cfq elliptics graylog2 sysctl.conf drupal encrypt rsync tool Salt scsi wordpress bash OpenStack ssh LSI cpu profiling rtl8723be vrrp initrd asoundrc NFS swap flash alsa MODx gpg zRam StorMan bonding AMD jackd