Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of Harbor statistics Prometheus metric #514

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/administration/metrics/_index.md
Expand Up @@ -51,6 +51,22 @@ Name | Description | Labels (Values) | Metric type
`harbor_core_http_request_total` | The total number of requests | method (`GET`, `POST`, `HEAD`, `PATCH`, `PUT`), operation (values from `operationId` in [Harbor API](https://github.com/goharbor/harbor/blob/main/api/v2.0/swagger.yaml). Some legacy endpoints do not have an `operationId`, so the label value is `unknown`) | counter
{{< /table >}}

## Harbor Statistics Metrics
Get the statistic information about the projects and repositories
The data exposed as metrics are 1:1 taken from the statistics API `/api/v2.0/statistics`.

{{< table caption="Statistics Metrics exposed by Harbor Core" >}}
Name | Description | Labels (Values) | Metric type
:---------|:------------|:-------|:-------
`harbor_statistics_private_project_amount` "Amount of private projects" || gauge
`harbor_statistics_private_repo_amount` | "Amount of private repositories" || gauge
`harbor_statistics_public_project_amount` | "Amount of public projects" || gauge
`harbor_statistics_public_repo_amount` | "Amount of public repositories" || gauge
`harbor_statistics_total_project_amount` | Total amount of projects || gauge
`harbor_statistics_total_repo_amount` | "Total amount of repositories" || gauge
`harbor_statistics_total_storage_consumption` | Total storage used in bytes | | gauge
{{< /table >}}

## Registry Metrics

The following are metrics pulled from the Docker distribution and are available at `<harbor_instance>:<metrics_port>/<metrics_path>?comp=registry`.
Expand Down