Blip Docs
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

repl

The repl domain includes metrics from multiple sources related to MySQL replication status.

This domain does not collect replication lag. Use the repl.lag to collection replication lag.

Usage

Currently, the domain reports only one derived metric: running. It uses SHOW REPLICA STATUS (or SHOW SLAVE STATUS prior to 8.0.22) to determine if a replica is running.

Derived Metrics

running

ValueMeaning
1  ☑MySQL is a replica
  ☑Slave_IO_Running=Yes
  ☑Slave_SQL_Running=Yes
  ☑Last_Errno=0
0MySQL is a replica, but IO and SQL threads are not running or a replication error occurred
-1MySQL is not a replica: SHOW REPLICA STATUS returns no output

This metric is intended for alerting: alert if running is zero for too long.

Replication lag does not affect this metric: replication can be running but lagging. Monitor and alert on replication lag separately.

Options

report-not-a-replica

ValueDefaultDescription
yesReport running = -1 if not a replica.
noDrop the metric if not a replica.

Group Keys

None.

Meta

KeyValue
sourceSource_Host or Master_Host

Error Policies

NameMySQL Error
access-denied1227: access denied on ‘SHOW REPLICA STATUS’ (need REPLICATION CLIENT priv)"

MySQL Config

MySQL must be configured as a replica.

Changelog

Blip VersionChange
v1.0.1Add report-not-a-replica
v1.0.0Domain added