MySQL replication status plugin
Good morning guys, (and girls), I hope all is well. I've been given the task to, and I quote - Write a Nagios plugin to test the replication status of two servers by comparing the position on the master to that on the slave To save myself a lot of work, I'd like to know if anything has been done in this arena already, I would be over the moon, if someone has beaten me to it, but I am so not in the mood to write one! Any hints, recommendations, and ideas are wholly welcome! --- Kind Regards, Mr Gabriel
RE: MySQL replication status plugin
You could try this: http://www.consol.de/opensource/nagios/check-mysql-health (in German but should be self-explanatory). Cheers, Andrew -Original Message- From: Gabriel - IP Guys [mailto:gabr...@impactteachers.com] Sent: 15 April 2009 10:12 To: replicat...@lists.mysql.com Cc: mysql@lists.mysql.com Subject: MySQL replication status plugin Good morning guys, (and girls), I hope all is well. I've been given the task to, and I quote - Write a Nagios plugin to test the replication status of two servers by comparing the position on the master to that on the slave To save myself a lot of work, I'd like to know if anything has been done in this arena already, I would be over the moon, if someone has beaten me to it, but I am so not in the mood to write one! Any hints, recommendations, and ideas are wholly welcome! --- Kind Regards, Mr Gabriel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: MySQL replication status plugin
I'd just write a perl script to do it and return the appropriate status code/message to nagios. Shouldn't be hard at all. PhP or any language that can talk to mysql would work, too. You just mentioned the position, you'll have to compare the names of the binlog files as well: position 100 in file bin-00010 is ahead of positions 9 in file bin-9. On Wed, Apr 15, 2009 at 4:12 AM, Gabriel - IP Guys gabr...@impactteachers.com wrote: Good morning guys, (and girls), I hope all is well. I've been given the task to, and I quote - Write a Nagios plugin to test the replication status of two servers by comparing the position on the master to that on the slave To save myself a lot of work, I'd like to know if anything has been done in this arena already, I would be over the moon, if someone has beaten me to it, but I am so not in the mood to write one! Any hints, recommendations, and ideas are wholly welcome! --- Kind Regards, Mr Gabriel -- Jim Lyons Web developer / Database administrator http://www.weblyons.com
Re: MySQL replication status plugin
I would not compare binlog positions. I would use mk-heartbeat from Maatkit. It tells the truth in a much simpler and more direct way. Instead of checking things that indicate your data is being replicated, just replicate some data and check the data itself. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org