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

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