From f38e6fa8d8a06f5a34f38eba8c59346116932ef4 Mon Sep 17 00:00:00 2001 From: Shuhei Kitagawa Date: Sun, 25 Jun 2023 05:07:33 +0900 Subject: [PATCH] Update docs/api/metrics.md (#2445) Signed-off-by: shuheiktgw --- docs/api/metrics.md | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/docs/api/metrics.md b/docs/api/metrics.md index 8330fc19f..9a9198f95 100644 --- a/docs/api/metrics.md +++ b/docs/api/metrics.md @@ -9,23 +9,37 @@ The External Secrets Operator exposes its Prometheus metrics in the `/metrics` p If you are using a different monitoring tool that also needs a `/metrics` endpoint, you can set the `metrics.service.enabled` Helm flag to `true`. In addition you can also set `webhook.metrics.service.enabled` and `certController.metrics.service.enabled` to scrape the other components. -The Operator has the metrics inherited from Kubebuilder plus some custom metrics with the `externalsecret` prefix. +The Operator has [the controller-runtime metrics inherited from kubebuilder](https://book.kubebuilder.io/reference/metrics-reference.html) plus some custom metrics with a resource name prefix, such as `externalsecret_`. + +## Cluster External Secret Metrics +| Name | Type | Description | +|--------------------------------------------|-------|------------------------------------------------------------| +| `clusterexternalsecret_status_condition` | Gauge | The status condition of a specific Cluster External Secret | +| `clusterexternalsecret_reconcile_duration` | Gauge | The duration time to reconcile the Cluster External Secret | ## External Secret Metrics +| Name | Type | Description | +|------------------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `externalsecret_provider_api_calls_count` | Counter | Number of API calls made to an upstream secret provider API. The metric provides a `provider`, `call` and `status` labels. | +| `externalsecret_sync_calls_total` | Counter | Total number of the External Secret sync calls | +| `externalsecret_sync_calls_error` | Counter | Total number of the External Secret sync errors | +| `externalsecret_status_condition` | Gauge | The status condition of a specific External Secret | +| `externalsecret_reconcile_duration` | Gauge | The duration time to reconcile the External Secret | -| Name | Type | Description | -| ---------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `externalsecret_provider_api_calls_count` | Counter | Number of API calls made to an upstream secret provider API. The metric provides a `provider`, `call` and `status` labels. | -| `externalsecret_sync_calls_total` | Counter | Total number of the External Secret sync calls | -| `externalsecret_sync_calls_error` | Counter | Total number of the External Secret sync errors | -| `externalsecret_status_condition` | Gauge | The status condition of a specific External Secret | -| `externalsecret_reconcile_duration` | Gauge | The duration time to reconcile the External Secret | -| `controller_runtime_reconcile_total` | Counter | Holds the totalnumber of reconciliations per controller. It has two labels. controller label refers to the controller name and result label refers to the reconcile result i.e success, error, requeue, requeue_after. | -| `controller_runtime_reconcile_errors_total` | Counter | Total number of reconcile errors per controller | -| `controller_runtime_reconcile_time_seconds` | Histogram | Length of time per reconcile per controller | -| `controller_runtime_reconcile_queue_length` | Gauge | Length of reconcile queue per controller | -| `controller_runtime_max_concurrent_reconciles` | Gauge | Maximum number of concurrent reconciles per controller | -| `controller_runtime_active_workers` | Gauge | Number of currently used workers per controller | +## Cluster Secret Store Metrics +| Name | Type | Description | +|-----------------------------------------|-------|---------------------------------------------------------| +| `clustersecretstore_status_condition` | Gauge | The status condition of a specific Cluster Secret Store | +| `clustersecretstore_reconcile_duration` | Gauge | The duration time to reconcile the Cluster Secret Store | + +# Secret Store Metrics +| Name | Type | Description | +|----------------------------------|-------|-------------------------------------------------| +| `secretstore_status_condition` | Gauge | The status condition of a specific Secret Store | +| `secretstore_reconcile_duration` | Gauge | The duration time to reconcile the Secret Store | + +## Controller Runtime Metrics +See [the kubebuilder documentation](https://book.kubebuilder.io/reference/metrics-reference.html) on the default exported metrics by controller-runtime. ## Dashboard