exposes Prometheus metrics at each stage of the replication pipeline. When using Replicator to perform or , you should monitor the health of each relevant pipeline stage to quickly detect issues.
This page describes and provides usage guidelines for Replicator metrics, according to the replication source:
- PostgreSQL
- MySQL
- Oracle
- CockroachDB (during )
Some of the contents of this page are specific to your source database (PostgreSQL, MySQL, Oracle, or CockroachDB for failback). Select your source using the dropdown at the top right of this page.
Replication pipeline
replicates data as a pipeline of change events that travel from the source database to the target database where changes are applied. The Replicator pipeline consists of four stages:
- Source read: Connects Replicator to the source database and captures changes via logical replication (PostgreSQL, MySQL), LogMiner (Oracle), or (CockroachDB).
If successful, Replicator will start, and the console output will indicate that the snapshotter has started as well:
Upon interruption of Replicator, the snapshotter will be stopped:
Step 2. Find the snapshot files in the data directory
You can find the snapshot files in the :
The uncompressed files list the metrics collected at that snapshot:
Bundle and send metrics snapshots
The following requires a Linux system that supports bash.
Step 1. Download the export script
Download the metrics snapshot export script. Ensure it’s accessible and can be run by the current user.
Step 2. Run a snapshot export
Run an export, indicating the metrics-snapshots directory within your . You can also provide start and end timestamps to define a subset of metrics to bundle. Times are specified as UTC and should be of the format YYYYMMDDTHHMMSS.
Running the script without timestamps bundles all of the data in the snapshot directory. For example:
Running the script with one timestamp bundles all of the data in the snapshot directory beginning at that timestamp. For example:
Running the script with two timestamps bundles all of the data in the snapshot directory within the two timestamps. For example:
The resulting output is a .tar.gz file placed in the directory from which you ran the script (or to a path specified as an optional argument).
Step 3. Upload output file to a support ticket
Include this bundled metrics snapshot file on a to give support metrics information that’s relevant to your issue.
See also