diff --git a/HowtoMySQL/Replication.md b/HowtoMySQL/Replication.md index 0b6ef2da..2729db12 100644 --- a/HowtoMySQL/Replication.md +++ b/HowtoMySQL/Replication.md @@ -194,6 +194,8 @@ log-slave-updates ## Monitoring +### Icinga/nagios + Pour surveiller que la réplication se fait bien et n'est pas en retard ou cassé par une erreur, on peut mettre en place un check nrpe *mysql_slave* Il faut pour cela donner les droits "REPLICATION CLIENT" a l'utilisateur MySQL nrpe : @@ -202,6 +204,15 @@ Il faut pour cela donner les droits "REPLICATION CLIENT" a l'utilisateur MySQL n GRANT REPLICATION CLIENT on *.* TO 'nrpe'@'localhost' IDENTIFIED BY 'PASSWORD'; ~~~ +### Munin + +Il est aussi intéressant d'ajouter certains graphes à munin pour suivre la application dans le temps. + +~~~ +ln -s '/usr/share/munin/plugins/mysql_' '/etc/munin/plugins/mysql_bin_relay_log' +ln -s '/usr/share/munin/plugins/mysql_' '/etc/munin/plugins/mysql_replication' +~~~ + ## Résolution des erreurs lors de la réplication On vérifie les erreurs avec les commandes `SHOW SLAVE STATUS` et `SHOW MASTER STATUS`.