Munin plugin for graphing MySQL slave delay

I wanted to track the delay of a mysql slave server in Munin, and found nothing appropriate after a quick google. So, in case anyone else finds it useful, here is a plugin which will allow you to do just that.

Here’s a typical graph:

Slave Delay Graph

Download: mysql_slave (1 Kb)

EDIT: I wrote this so I could better understand the recovery time of a slave which had 13 hours of updates to catch up on. While it was good for that, it’s less useful for the day-to-day lag as munin will only be polling it every 5 minutes. A better way would be to use mk-heartbeat to get a more accurate moving average.

2 thoughts on “Munin plugin for graphing MySQL slave delay

  1. Dalmy

    Hello,

    Can u show an example with all the options ?
    I have 2 servers: one is master, one is slave.

    Where shall I use the scrippt? Do I need connections to both server?

Comments are closed.