Skip to main content
You can monitor a stream using: When you complete a , there will be a gap in the primary cluster’s metrics whether you are monitoring via the DB Console or Prometheus. The standby cluster will also require separate monitoring to ensure observability during the failover period. You can use the DB console to track the relevant metrics, or you can use a tool like to create two separate dashboards, one for each cluster, or a single dashboard with data from both clusters.

SQL Shell

In the standby cluster’s SQL shell, you can query SHOW VIRTUAL CLUSTER... WITH REPLICATION STATUS for detail on status and timestamps for planning :
Refer to Responses for a description of each field.

Responses

Data state

DB Console

You can use the of the standby cluster’s to monitor:

Prometheus

You can use Prometheus and Alertmanager to track and alert on PCR metrics. Refer to the tutorial for steps to set up Prometheus. We recommend tracking the following metrics:
  • physical_replication.logical_bytes: The logical bytes (the sum of all keys and values) ingested by all PCR jobs.
  • physical_replication.replicated_time_seconds: The of the physical replication stream in seconds since the Unix epoch.

Data verification

This feature is in and subject to change. To share feedback and/or issues, contact Support.
The SHOW EXPERIMENTAL_FINGERPRINTS statement verifies that the data transmission and ingestion is working as expected while a replication stream is running. Any checksum mismatch likely represents corruption or a bug in CockroachDB. SHOW EXPERIMENTAL_FINGERPRINTS is only to verify data. Should you encounter such a mismatch, contact Support. To verify that the data at a certain point in time is correct on the standby cluster, you can use the from the replication job information to run a point-in-time fingerprint on both the primary and standby clusters. This will verify that the transmission and ingestion of the data on the standby cluster, at that point in time, is correct.
  1. Retrieve the current replicated time of the replication job on the standby cluster with :
    For detail on connecting to the standby cluster, refer to .
  2. From the primary cluster’s system virtual cluster, specify a timestamp at or earlier than the current replicated_time to retrieve the fingerprint. This example uses the current replicated_time:
    For detail on connecting to the primary cluster, refer to .
  3. From the standby cluster’s system virtual cluster, specify the same timestamp used on the primary cluster to retrieve the standby cluster’s fingerprint:
  4. Compare the fingerprints of the primary and standby clusters to verify the data. The same value for the fingerprints indicates the data is correct.

See also