This is a module for monitoring a pool of replicated master and slave MySQL SQL database servers (latest versions in the 4 series) and insuring that the servers are synchronized.

On UNIX type platforms, it requires the mysqltcl package (at http://www.xdobry.de/mysqltcl/) for connection via the native MySQL protocol, or the tclodbc package (at http://tclodbc.sourceforge.net/) for connection via ODBC (Open DataBase Connectivity).
On Windows platforms, please read the install.txt file.

Data is drawn using the SHOW MASTER STATUS, SHOW SLAVE STATUS, SHOW VARIABLES and SHOW MASTER LOGS query results and initially displayed in 1 table:

view of the myreplication module table

There are 9 data columns:

The delay is calculated as follows:
  1. Among all the monitored servers, the highest log file index with the greatest position is used as a reference (this method ensuring forward compatibility since it does not care whether there is one or several masters for example)
  2. When a server is found late (its log file index or position do not match the reference determined above), the poll time is added to its delay value (which means that the delay precision is the poll time value)
  3. When a server is no longer late, its delay is reset to 0

Error handling:

When an error occurs (communicating with the database servers or any other type), cells in the id, delay and position are set to void numeric values (displayed as ?), while all other cells are emptied. A descriptive error message is also generated in such a case.

Module options:

Thresholds:

In order to monitor the replicated servers pool, you could, for example:

Examples:

$ moodss myreplication --hosts 192.168.0.1,192.168.0.10,192.168.0.11
$ moodss myreplication --hosts master.company.com,slave.company.com:3308
$ moodss myreplication --hosts master.company.com,slave.company.com,backup.company.com --user replicator --password xxxxxx
$ moodss myreplication --dsns mymaster,myslave1,myslave2,myslave3 --user jdoe --password xxxxxx