From 3bd7a61e463659f23adbf0567356de45786d9cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Fri, 18 Jul 2025 08:50:03 +0200 Subject: [PATCH] Document the metrics exposed in search and postprocessing --- services/postprocessing/README.md | 14 ++++++++++++++ services/search/README.md | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/services/postprocessing/README.md b/services/postprocessing/README.md index cd8d87755..fba133f5d 100644 --- a/services/postprocessing/README.md +++ b/services/postprocessing/README.md @@ -119,3 +119,17 @@ Depending if you want to restart/resume all or defined failed uploads, different opencloud postprocessing resume -s "finished" # Equivalent to the above opencloud postprocessing resume -s "virusscan" # Resume all uploads currently in virusscan step ``` + +## Metrics + +The postprocessing service exposes the following prometheus metrics at `/metrics` (as configured using the `POSTPROCESSING_DEBUG_ADDR` env var): + +| Metric Name | Type | Description | Labels | +| --- | --- | --- | --- | +| `opencloud_postprocessing_build_info` | Gauge | Build information | `version` | +| `opencloud_postprocessing_events_outstanding_acks` | Gauge | Number of outstanding acks for events | | +| `opencloud_postprocessing_events_unprocessed` | Gauge | Number of unprocessed events | | +| `opencloud_postprocessing_events_redelivered` | Gauge | Number of redelivered events | | +| `opencloud_postprocessing_in_progress` | Gauge | Number of postprocessing events in progress | | +| `opencloud_postprocessing_finished` | Counter | Number of finished postprocessing events | `status` | +| `opencloud_postprocessing_duration_seconds` | Histogram | Duration of postprocessing operations in seconds | `status` | diff --git a/services/search/README.md b/services/search/README.md index 01c15de02..24b492b11 100644 --- a/services/search/README.md +++ b/services/search/README.md @@ -162,3 +162,16 @@ The indexing process tries to be self-healing in some situations. In the following example, let's assume a file tree `foo/bar/baz` exists. If the folder `bar` gets renamed to `new-bar`, the path to `baz` is no longer `foo/bar/baz` but `foo/new-bar/baz`. The search service checks the change and either just updates the path in the index or creates a new index for all items affected if none was present. + +## Metrics + +The search service exposes the following prometheus metrics at `/metrics` (as configured using the `SEARCH_DEBUG_ADDR` env var): + +| Metric Name | Type | Description | Labels | +| --- | --- | --- | --- | +| `opencloud_search_build_info` | Gauge | Build information | `version` | +| `opencloud_search_events_outstanding_acks` | Gauge | Number of outstanding acks for events | | +| `opencloud_search_events_unprocessed` | Gauge | Number of unprocessed events | | +| `opencloud_search_events_redelivered` | Gauge | Number of redelivered events | | +| `opencloud_search_search_duration_seconds` | Histogram | Duration of search operations in seconds | `status` | +| `opencloud_search_index_duration_seconds` | Histogram | Duration of indexing operations in seconds | `status` |