munin

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