You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/current/_includes/molt/migration-stop-replication.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,13 @@
2
2
3
3
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:
4
4
- When replication is caught up, you will not see new `upserted rows` logs.
5
-
- 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:
5
+
- If you set up the replication metrics endpoint with `--metricsAddr` in the preceding steps, metrics are available at:
6
+
7
+
~~~
8
+
http://{host}:{port}/_/varz
9
+
~~~
10
+
11
+
Use the following Prometheus alert expression to observe when the combined rate of upserts and deletes is `0` for each schema:
6
12
7
13
~~~
8
14
sum by (schema) (rate(apply_upserts_total[$__rate_interval]) + rate(apply_deletes_total[$__rate_interval]))
|`--metricsAddr`|`STRING`| A `host:port` on which to serve metrics and diagnostics. |
14
+
|`--metricsAddr`|`STRING`| A `host:port` on which to serve metrics and diagnostics. The metrics endpoint is `http://host:port/_/varz`.|
15
15
|`--parallelism`|`INT`| The number of concurrent database transactions to use.<br><br>**Default:**`16`|
16
16
|`--quiescentPeriod`|`DURATION`| How often to retry deferred mutations.<br><br>**Default:**`10s`|
17
17
|`--retireOffset`|`DURATION`| How long to delay removal of applied mutations.<br><br>**Default:**`24h0m0s`|
18
18
|`--scanSize`|`INT`| The number of rows to retrieve from the staging database used to store metadata for [replication modes](#fetch-mode).<br><br>**Default:**`10000`|
19
19
|`--schemaRefresh`|`DURATION`| How often a watcher will refresh its schema. If this value is zero or negative, refresh behavior will be disabled.<br><br>**Default:**`1m0s`|
20
20
|`--sourceConn`|`STRING`| The source database's connection string. |
21
-
|`--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.<br><br>**Default:**`false`|
21
+
|`--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.<br><br>**Default:**`false`|
22
22
|`--stageMarkAppliedLimit`|`INT`| Limit the number of mutations to be marked applied in a single statement.<br><br>**Default:**`100000`|
23
23
|`--stageSanityCheckPeriod`|`DURATION`| How often to validate staging table apply order (`-1` to disable).<br><br>**Default:**`10m0s`|
24
24
|`--stageSanityCheckWindow`|`DURATION`| How far back to look when validating staging table apply order.<br><br>**Default:**`1h0m0s`|
`--metricsAddr` enables a Prometheus-compatible metrics endpoint (e.g., on port `30005`) where replication metrics will be served.
136
+
`--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`.
Copy file name to clipboardExpand all lines: src/current/molt/migrate-to-cockroachdb.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Start the initial load of data into the target database. Continuous replication
64
64
--non-interactive \
65
65
--mode data-load-and-replication \
66
66
--pglogical-replication-slot-name cdc_slot \
67
-
--replicator-flags '--metricsAddr: 30005'
67
+
--replicator-flags '--metricsAddr :30005'
68
68
~~~
69
69
</section>
70
70
@@ -79,12 +79,12 @@ Start the initial load of data into the target database. Continuous replication
79
79
--table-handling truncate-if-exists \
80
80
--non-interactive \
81
81
--mode data-load-and-replication \
82
-
--replicator-flags '--metricsAddr: 30005'
82
+
--replicator-flags '--metricsAddr :30005'
83
83
~~~
84
84
</section>
85
85
86
86
{{site.data.alerts.callout_info}}
87
-
`--metricsAddr` enables a Prometheus-compatible metrics endpoint (e.g., on port `30005`) where replication metrics will be served.
87
+
`--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`.
Copy file name to clipboardExpand all lines: src/current/molt/molt-fetch.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -899,6 +899,10 @@ You can use the `cdc_cursor` value with an external change data capture (CDC) to
899
899
900
900
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).
901
901
902
+
{{site.data.alerts.callout_info}}
903
+
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`.
904
+
{{site.data.alerts.end}}
905
+
902
906
Cockroach Labs recommends monitoring the following metrics:
0 commit comments