[Pdns-users] Using AXFR vs. Mysql Replication
lb-pdns-users at projectdream.org
Tue Jun 27 18:41:21 UTC 2006
* Tony Adams <aadams at esnet.com>:
> I too am interested in a method for monitoring the status of mysql
> replication. I've been very fortunate so far in that it seems to just
> work, but I'd like to have a better system in place for the eventuality
> that it won't.
[ resend of the message i originally wrote to Max ]
[ I've stripped to attachment, and put it here:
Here's a public site of our Nagios setup:
Attached is the check_mysqlrepl script i use to monitor my MySQL
Replication setup. This script needs to be run once per slave.
I've modified this script to check MySQL Replication using MySQL
5 correctly. If you're using a previous version of MySQL, you
will need to adjust some variables in this scripts, in Line 97.
Use SHOW MASTER STATUS\G and SHOW SLAVE STATUS\G to find out
which values you need. Pay attention that you monitor the correct
There's Relay_Log_Pos, which shows to which position the log
files haben been TRANSFERRED. There's also Exec_Master_Log_Pos,
which shows to which position the log files have been
SUCCESSFULLY EXECUTED. You need to monitor the latter value, the
first is worthless and will only be triggered in case master and
slave lose connectivity.
You could also check for Slave_SQL_Running, but i didn't do this
yet (saw no need). Running the replication check script is rather
/usr/share/nagios/check_mysqlrepl --crit 10000 --warn 5000
--master michelle --slave janna --dbuser repltest --dbpass
foo --mport 3308 --sport 3308
michelle is the hostname of the master, janna the hostname of the
slave. There's also a check_mysql C Program, which is part of
nagios-plugins. You can get them at nagios.org.
If you want, i could also send you my complete nagios config, but
i would need to edit out all passwords first. So i didn't do this
proactively yet ;)
If you want to monitor several Key values of your MySQL database,
i can also recommend you to use cacti and this Host template:
This will give you lots of nice graphs about the usage of your
database, which can be very helpful when looking for performance
We're also using http://www.ecall.ch to send SMS with Nagios,
which is very cool (you get notified of any problem immediately).
A proper implementation of nagios WILL take some effort, but it
will be worth it.
Hope this helps,
More information about the Pdns-users