From d1963c948edc319f9c4c6ef4087c17da7ca67964 Mon Sep 17 00:00:00 2001 From: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:43:37 +0530 Subject: [PATCH] docs: add the metrics to the docs (#1606) Signed-off-by: Manan Gupta --- .../docs/18.0/reference/vtorc/ui_api_metrics.md | 17 ++++++++++------- .../configuration-advanced/reparenting.md | 10 ++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/content/en/docs/18.0/reference/vtorc/ui_api_metrics.md b/content/en/docs/18.0/reference/vtorc/ui_api_metrics.md index 91e08a5d9..ba73782ae 100644 --- a/content/en/docs/18.0/reference/vtorc/ui_api_metrics.md +++ b/content/en/docs/18.0/reference/vtorc/ui_api_metrics.md @@ -28,13 +28,16 @@ VTOrc supports the following APIs which can be used for monitoring and changing Metrics are available to be seen on the `/debug/vars` page. VTOrc exports the following metrics: -| Metric | Usage | -|-------------------------|------------------------------------------------------------------------------------------------------| -| `PendingRecoveries` | The number of recoveries in progress which haven't completed. | -| `RecoveriesCount` | The number of recoveries run. This is further subdivided for all the different recoveries. | -| `SuccessfulRecoveries` | The number of succesful recoveries run. This is further subdivided for all the different recoveries. | -| `FailedRecoveries` | The number of recoveries that failed. This is further subdivided for all the different recoveries. | -| `ErrantGtidTabletCount` | The number of tablets with errant GTIDs as detected by VTOrc. | +| Metric | Usage | +|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| `PendingRecoveries` | The number of recoveries in progress which haven't completed. | +| `RecoveriesCount` | The number of recoveries run. This is further subdivided for all the different recoveries. | +| `SuccessfulRecoveries` | The number of succesful recoveries run. This is further subdivided for all the different recoveries. | +| `FailedRecoveries` | The number of recoveries that failed. This is further subdivided for all the different recoveries. | +| `ErrantGtidTabletCount` | The number of tablets with errant GTIDs as detected by VTOrc. | +| `planned_reparent_counts` | Number of times Planned Reparent Shard has been run. It is further subdivided by the keyspace, shard and the result of the operation. | +| `emergency_reparent_counts` | Number of times Emergency Reparent Shard has been run. It is further subdivided by the keyspace, shard and the result of the operation. | +| `reparent_shard_operation_timings` | Timings of reparent shard operations indexed by the type of operation. | {{< info >}} diff --git a/content/en/docs/18.0/user-guides/configuration-advanced/reparenting.md b/content/en/docs/18.0/user-guides/configuration-advanced/reparenting.md index 5c92cec34..499ccea61 100644 --- a/content/en/docs/18.0/user-guides/configuration-advanced/reparenting.md +++ b/content/en/docs/18.0/user-guides/configuration-advanced/reparenting.md @@ -78,6 +78,16 @@ This command performs the following actions: The new primary (if unspecified) is chosen using the configured [Durability Policy](../../configuration-basic/durability_policy). +### Metrics + +Metrics are available to be seen on the `/debug/vars` page of VTOrc and vtctld for the reparent operations that they execute: + +| Metric | Usage | +|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| `planned_reparent_counts` | Number of times Planned Reparent Shard has been run. It is further subdivided by the keyspace, shard and the result of the operation. | +| `emergency_reparent_counts` | Number of times Emergency Reparent Shard has been run. It is further subdivided by the keyspace, shard and the result of the operation. | +| `reparent_shard_operation_timings` | Timings of reparent shard operations indexed by the type of operation. | + ## External Reparenting External reparenting occurs when another tool handles the process of changing a shard's primary tablet. After that occurs, the tool needs to call the [`vtctl TabletExternallyReparented`](../../../reference/programs/vtctl/shards/#tabletexternallyreparented) command to ensure that the topology service, replication graph, and serving graph are updated accordingly.