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-3.2.2 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-3.2.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-3.2.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-3.1.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-3.0.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-3.0.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.16.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.15.2 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.15.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.15.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.14.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.13.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.13.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.12.2 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.12.1 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
rubber-2.12.0 templates/munin/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
sml-rubber-0.9.1 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
sml-rubber-0.9.10 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
sml-rubber-0.9.11 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
sml-rubber-0.9.13 generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin