Check mysql-replica-status


Checks the replication status of MySQL/MariaDB. Logic is taken from MySQLTuner script, v1.9.8.


Fact Sheet

Check Plugin Download

Check Interval Recommendation

Once a minute

Can be called without parameters


Compiled for

Linux, Windows


User with SUPER, REPLICATION CLIENT and REPLICATION SLAVE privileges, locked down to - for example monitoring\@ Usernames in MySQL/MariaDB are limited to 16 chars in specific versions.

3rd Party Python modules



usage: mysql-replica-status [-h] [-V] [--always-ok]
                            [--defaults-file DEFAULTS_FILE]
                            [--defaults-group DEFAULTS_GROUP]
                            [--severity {warn,crit}] [--timeout TIMEOUT]

Checks the replication status of MySQL/MariaDB.

  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --always-ok           Always returns OK.
  --defaults-file DEFAULTS_FILE
                        Specifies a cnf file to read parameters like user,
                        host and password from (instead of specifying them on
                        the command line), for example
                        `/var/spool/icinga2/.my.cnf`. Default:
  --defaults-group DEFAULTS_GROUP
                        Group/section to read from in the cnf file. Default:
  --severity {warn,crit}
                        Severity for alerts that do not depend on thresholds.
                        One of "warn" or "crit". Default: warn
  --timeout TIMEOUT     Network timeout in seconds. Default: 3 (seconds)

Usage Examples

./mysql-replica-status --defaults-file=/var/spool/icinga2/.my.cnf


Galera Synchronous replication: NO. Binlog format: ROW, XA support enabled: ON. Semi synchronous Primary: Not Activated. Semi synchronous Replica: Not Activated. This Replica is not running but seems to be configured [WARNING].


Alert with the given severity, if the replica (aka slave)…

  • is not running but seems to be configured

  • is running with the read_only option disabled

  • is lagging behind Primary

Perfdata / Metrics

There is no perfdata.

Credits, License