diff --git a/src/current/_includes/molt/migration-stop-replication.md b/src/current/_includes/molt/migration-stop-replication.md index 8caa7aa14d3..9da45f9be36 100644 --- a/src/current/_includes/molt/migration-stop-replication.md +++ b/src/current/_includes/molt/migration-stop-replication.md @@ -2,7 +2,13 @@ 1. Wait for replication to drain, which means that all transactions that occurred on the source database have been fully processed and replicated to CockroachDB. There are two ways to determine that replication has fully drained: - When replication is caught up, you will not see new `upserted rows` logs. - - If you set up the replication metrics endpoint with `--metricsAddr` in the preceding steps, use the following Prometheus alert expression to observe when the combined rate of upserts and deletes is `0` for each schema: + - If you set up the replication metrics endpoint with `--metricsAddr` in the preceding steps, metrics are available at: + + ~~~ + http://{host}:{port}/_/varz + ~~~ + + Use the following Prometheus alert expression to observe when the combined rate of upserts and deletes is `0` for each schema: ~~~ sum by (schema) (rate(apply_upserts_total[$__rate_interval]) + rate(apply_deletes_total[$__rate_interval])) diff --git a/src/current/_includes/molt/replicator-flags.md b/src/current/_includes/molt/replicator-flags.md index 5f1e43e3d9e..791870ba669 100644 --- a/src/current/_includes/molt/replicator-flags.md +++ b/src/current/_includes/molt/replicator-flags.md @@ -11,14 +11,14 @@ The following flags are set with [`--replicator-flags`](#global-flags) and can b | `--gracePeriod` | `DURATION` | Allow background processes to exit.

**Default:** `30s` | | `--logDestination` | `STRING` | Write logs to a file. If not specified, write logs to `stdout`. | | `--logFormat` | `STRING` | Choose log output format: `"fluent"`, `"text"`.

**Default:** `"text"` | -| `--metricsAddr` | `STRING` | A `host:port` on which to serve metrics and diagnostics. | +| `--metricsAddr` | `STRING` | A `host:port` on which to serve metrics and diagnostics. The metrics endpoint is `http://{host}:{port}/_/varz`. | | `--parallelism` | `INT` | The number of concurrent database transactions to use.

**Default:** `16` | | `--quiescentPeriod` | `DURATION` | How often to retry deferred mutations.

**Default:** `10s` | | `--retireOffset` | `DURATION` | How long to delay removal of applied mutations.

**Default:** `24h0m0s` | | `--scanSize` | `INT` | The number of rows to retrieve from the staging database used to store metadata for [replication modes](#fetch-mode).

**Default:** `10000` | | `--schemaRefresh` | `DURATION` | How often a watcher will refresh its schema. If this value is zero or negative, refresh behavior will be disabled.

**Default:** `1m0s` | | `--sourceConn` | `STRING` | The source database's connection string. | -| `--stageDisableCreateTableReaderIndex` | `BOOL` | Disable the creation of partial covering indexes to improve read performance on staging tables. Set to `true` if creating indexes on existing tables would cause a significant operational impact.

**Default:** `false` | +| `--stageDisableCreateTableReaderIndex` | `BOOL` | Disable the creation of partial covering indexes to improve read performance on staging tables. Set to `true` if creating indexes on existing tables would cause a significant operational impact.

**Default:** `false` | | `--stageMarkAppliedLimit` | `INT` | Limit the number of mutations to be marked applied in a single statement.

**Default:** `100000` | | `--stageSanityCheckPeriod` | `DURATION` | How often to validate staging table apply order (`-1` to disable).

**Default:** `10m0s` | | `--stageSanityCheckWindow` | `DURATION` | How far back to look when validating staging table apply order.

**Default:** `1h0m0s` | diff --git a/src/current/molt/migrate-in-phases.md b/src/current/molt/migrate-in-phases.md index c0d12d9669c..77e098a0ce0 100644 --- a/src/current/molt/migrate-in-phases.md +++ b/src/current/molt/migrate-in-phases.md @@ -113,7 +113,7 @@ The following example specifies that the `employees` table should be watched for --non-interactive \ --mode replication-only \ --pglogical-replication-slot-name cdc_slot \ - --replicator-flags '--metricsAddr: 30005' + --replicator-flags '--metricsAddr :30005' ~~~ @@ -128,12 +128,12 @@ The following example specifies that the `employees` table should be watched for --table-filter 'employees' \ --non-interactive \ --mode replication-only \ - --replicator-flags '--defaultGTIDSet 4c658ae6-e8ad-11ef-8449-0242ac140006:1-29 --metricsAddr: 30005' + --replicator-flags '--defaultGTIDSet 4c658ae6-e8ad-11ef-8449-0242ac140006:1-29 --metricsAddr :30005' ~~~ {{site.data.alerts.callout_info}} - `--metricsAddr` enables a Prometheus-compatible metrics endpoint (e.g., on port `30005`) where replication metrics will be served. + `--metricsAddr` enables a Prometheus-compatible metrics endpoint at `http://{host}:{port}/_/varz` where replication metrics will be served. In this example, the endpoint is `http://localhost:30005/_/varz`. {{site.data.alerts.end}} {% include molt/fetch-replication-output.md %} diff --git a/src/current/molt/migrate-to-cockroachdb.md b/src/current/molt/migrate-to-cockroachdb.md index afe3cbce442..17a43549c6a 100644 --- a/src/current/molt/migrate-to-cockroachdb.md +++ b/src/current/molt/migrate-to-cockroachdb.md @@ -64,7 +64,7 @@ Start the initial load of data into the target database. Continuous replication --non-interactive \ --mode data-load-and-replication \ --pglogical-replication-slot-name cdc_slot \ - --replicator-flags '--metricsAddr: 30005' + --replicator-flags '--metricsAddr :30005' ~~~ @@ -79,12 +79,12 @@ Start the initial load of data into the target database. Continuous replication --table-handling truncate-if-exists \ --non-interactive \ --mode data-load-and-replication \ - --replicator-flags '--metricsAddr: 30005' + --replicator-flags '--metricsAddr :30005' ~~~ {{site.data.alerts.callout_info}} - `--metricsAddr` enables a Prometheus-compatible metrics endpoint (e.g., on port `30005`) where replication metrics will be served. + `--metricsAddr` enables a Prometheus-compatible metrics endpoint at `http://{host}:{port}/_/varz` where replication metrics will be served. In this example, the endpoint is `http://localhost:30005/_/varz`. {{site.data.alerts.end}} {% include molt/fetch-data-load-output.md %} diff --git a/src/current/molt/molt-fetch.md b/src/current/molt/molt-fetch.md index 1275cda55c0..731a016f64d 100644 --- a/src/current/molt/molt-fetch.md +++ b/src/current/molt/molt-fetch.md @@ -15,7 +15,6 @@ The following source databases are currently supported: - PostgreSQL 11-16 - MySQL 5.7, 8.0 and later -- CockroachDB ## Installation @@ -900,6 +899,10 @@ You can use the `cdc_cursor` value with an external change data capture (CDC) to By default, MOLT Fetch exports [Prometheus](https://prometheus.io/) metrics at `127.0.0.1:3030/metrics`. You can configure this endpoint with the `--metrics-listen-addr` [flag](#global-flags). +{{site.data.alerts.callout_info}} +If [replication](#fetch-mode) is active, metrics from the `replicator` process are enabled by setting the `--metricsAddr` [replication flag](#replication-flags), and are served at `http://host:port/_/varz`. +{{site.data.alerts.end}} + Cockroach Labs recommends monitoring the following metrics: | Metric Name | Description | diff --git a/src/current/molt/molt-verify.md b/src/current/molt/molt-verify.md index a658b059d12..2449663f93f 100644 --- a/src/current/molt/molt-verify.md +++ b/src/current/molt/molt-verify.md @@ -23,11 +23,10 @@ For a demo of MOLT Verify, watch the following video: ## Supported databases -The following databases are currently supported: +The following source databases are currently supported: - PostgreSQL 12-16 - MySQL 5.7, 8.0 and later -- CockroachDB ## Installation