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.0.0.pre8 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.0.0.pre7 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.0.0.pre6 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.0.0.pre5 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.0.0.pre4 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.0.0.pre3 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.0.0.pre2 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.0.0.pre1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.15.0 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.15.0 lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.14.1 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.14.1 lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.14.0 lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.14.0 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.13.2 lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.13.2 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.13.1 lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-1.13.1 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
axtro-rubber-1.2.3 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
axtro-rubber-1.2.2 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin