Small script to check MySQL replication on FreeBSD. Path to mysql.sock as a parameter:
cat /usr/local/opt/check_relication.sh
#!/bin/sh
treshold=1200
### Do not edit below
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
if [ -z $1 ] ; then
echo "Usage: $0 /path/to/mysql.sock"
exit 255
fi
seconds=`mysql -S $1 -N -e "show slave status\G" | grep Seconds_Behind_Master | cut -d: -f 2`
if [ -z $seconds ] ; then
exit 255
fi
if [ $seconds = "NULL" ]; then
echo Replication kaput!!!
exit 255
fi
if [ $seconds -gt $treshold ]; then
echo Slave behind the master more than $treshold seconds!
fi
Just put to crontab something like this:
*/30 * * * * /usr/local/opt/check_relication.sh /tmp/mysql.sock
Subscribe to:
Post Comments (Atom)
6 comments:
louis vuitton handbags
louis vuitton
abercrombie & fitch
cheap jordans
cheap uggs for sale
canada goose jackets
christian louboutin outlet
ralph lauren polo
canada goose outlet
michael kors handbags
celine bags
nike roshe run
ugg boots
gucci handbags
michael kors outlet online
coach outlet
ugg outlet
louis vuitton
ugg boots
hollister clothing
toms outlet
coach outlet online
hollister jeans
louis vuitton
louis vuitton outlet online
ugg boots
cheap uggs
coach outlet
louis vuitton outlet stores
oakley sunglasses
gucci shoes
20151125yuanyuan
2016-4-21 xiaobao
longchamp handbags
christian louboutin outlet
cheap jordan shoes
louis vuitton handbags
coach outlet online
air jordan retro
polo ralph lauren
toms shoes
oakley outlet
adidas uk
michael kors outlet clearance
jordans
fitflop sandals
coach outlet
ray ban sunglasses
michael kors handbags
coach factorty outlet
nike outlet store
tory burch outlet
nike outlet store
ray ban
adidas originals
ugg boots
ray ban wayfarer
ray ban sunglasses
polo ralph lauren
oakley vault
coach factory outlet
christian louboutin outlet
louis vuitton handbags
michael kors outlet online
jordan 8s
michael kors outlet
coach factory outlet
adidas originals shoes
ray ban sunglasses
jordan 13
true religion outlet
air jordans
vans shoes
coach outlet online
true religion outlet
tory burch shoes
ugg outlet
hollister jeans
moncler soldes
instyler curling iron
toms outlet
cheap rolex watches
ugg boots
20172.6chenjinyan
kd shoes
tory burch outlet online
valentino outlet
yeezy shoes
birkenstock
coach factory outlet online
cheap jordan shoes
louis vuitton outlet online
louis vuitton handbags
ralph lauren sale
xushengda0528
https://khalejmovers.com/نقل-اثاث-من-الرياض-الى-الدمام/
https://khalejmovers.com/نقل-عفش-من-الرياض-الى-المدينة-المنورة/
https://khalejmovers.com/نقل-عفش-من-الرياض-الى-ابها/
https://khalejmovers.com/نقل-اثاث-من-الرياض-الى-القصيم/
https://khalejmovers.com/نقل-اثاث-من-الرياض-الى-جازان-نجران/
Much appreciate you writing this
Post a Comment