Sha256: 6602aad8c71084c6dbdbe4f9cca11efc1d75cfa7546174b0ff544530151d999e

Contents?: true

Size: 1.14 KB

Versions: 195

Compression:

Stored size: 1.14 KB

Contents

<%
  @path = "/etc/munin/plugins/mysql_slave"
  @perms = 0755
%>#!/bin/sh
#
# Plugin to monitor the slave delay
#
# Parameters:
#   
#   config
#   autoconf
#
# Configuration variables
#
# mysqlopts    - Options to pass to mysql
#
#%# family=auto
#%# capabilities=autoconf

MYSQLOPTS="$mysqlopts"
MYSQLADMIN=${mysqladmin:-mysqladmin}

if [ "$1" = "autoconf" ]; then
        $MYSQLADMIN --version 2>/dev/null >/dev/null
        if [ $? -eq 0 ]
        then
                $MYSQLADMIN $MYSQLOPTS status 2>/dev/null >/dev/null
                if [ $? -eq 0 ]
                then
                        echo yes
                        exit 0
                else
                        echo "no (could not connect to mysql)"
                fi
        else
                echo "no (mysqladmin not found)"
        fi
        exit 1
fi

if [ "$1" = "config" ]; then
  echo 'graph_title MySQL Slave Delay'
  echo 'graph_vlabel seconds'
  echo 'graph_category mysql'
  echo 'slave.label slave delay'
  echo 'graph_args --base 1000'
  exit 0
fi

/usr/bin/printf "slave.value "
echo "show slave status\G"| mysql $MYSQLOPTS | grep "Seconds_Behind_Master" | awk '{print $2}'

Version data entries

195 entries across 155 versions & 7 rubygems

Version Path
rubber-2.7.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.7.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.6.5 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.6.4 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.6.3 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.6.2 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.6.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.6.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.5.5 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.5.4 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.5.3 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.5.2 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.5.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.5.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.4.2 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.4.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.4.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.3.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.3.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.2.4 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin