This plugin checks your mysql replication threads and your lag synchronisation

How to use :

first you have to create an user with the REPLICATION CLIENT

     (or you can just grant this privilege)

 mysql> GRANT REPLICATION CLIENT TO 'replicateur'@'localhost' IDENTIFIED

        BY 'password';


 mysql> GRANT REPLICATION CLIENT TO 'replicateur'@'localhost'

second then just run the script:

$ ./ --help


./ [-a process|lag] [-p] [-D "CHECK MySQL REPLICATION - "] [-v] [-m] [-c 10] [-w 5]


Flag Description
-h, --help Print detailed help screen
-V, --version Print version information
-D, --display=STRING to modify the output display    (default is "CHECK MySQL REPLICATION - ")
-sa, --slave-address=STRING address or name of the slave mysql server (default is 3306)
-sl, --slave-login=STRING mysql login (default is user1)
-spd, --slave-password=STRING mysql password (default is password1)
-a, --action=STRING specify the action : process|lag|both (default is process)
process : display state of slave threads
lag : display the number of second behind the master
both : do process, then lag checks in one pass
-c, --critical=INT specify a threshold for the lag action.   (default is 10)
-w, --warning=INT specify a threshold for the lag action.   (default is 5)
-m, --more Print a longer output. By default, the output is not complete because Nagios may truncate it
-p, --perfdata If you want to activate the perfdata output
-v, --verbose Show details for command-line debugging (Nagios may truncate the output)