Harbor Monitor
Introduction
Harbor is an open-source, enterprise-grade container registry designed to securely store, manage, and distribute OCI artifacts such as container images and Helm charts.
Getting Started
Compatibility
This source supports monitoring of:
*Harbor deployments that expose Prometheus-compatible metrics endpoints. *Harbor components with /metrics enabled (core, registry, job service, exporter).
Harbor instances deployed on: *Kubernetes *OpenShift *Virtual machines or bare-metal servers
This source requires: *Accessible HTTP/HTTPS metrics endpoint *Prometheus-format metrics output *Network connectivity from Telegraf to Harbor
Data Collection Method
The Harbor monitoring source collects metrics using the Prometheus exposition format over HTTP/HTTPS. The collection workflow is as follows: *Connects to the Harbor metrics endpoint (/metrics) at configured scrape intervals. *Sends HTTP/HTTPS requests to the configured Harbor service endpoint. *Retrieves metrics exposed in Prometheus text format. *Parses metric names, labels, and values using Telegraf’s Prometheus input plugin. *Converts scraped metrics into Telegraf metric objects. *Forwards processed metrics to the configured output (Kafka, InfluxDB, etc.) for downstream processing and storage.
The plugin supports scraping multiple Harbor components or endpoints in parallel for efficient metric collection.
Prerequisites
Dependent Configuration
To configure this O11ySource, create a 'credential' of type 'user' under the 'Definition' tab.
Inputs for Configuring Data Source
- Data Source Name: The Harbor Source Name
- Endpoint URL: Add the endpoint URL for the Harbor Array
- Polling Interval (in seconds): How frequently data is gathered. The period should be between 60 seconds – 3000 seconds.
- Authentication Method: Select the Authentication Method
- credential: Credentials to access the Harbor endpoint
- Bearer Token: Bearer token to authenticate with the Harbor endpoint
Firewall Requirement
To collect data from this O11ySource, ensure the following ports are opened:
| Source IP | Destination IP | Destination Port | Protocol | Direction |
|---|---|---|---|---|
| vuSmartMaps IP | Harbor endpoint | 9090* | TCP | Outbound |
*Before providing the firewall requirements, please update the port based on the customer environment.
Configuring the Target
Before configuring the Harbor o11y source, ensure that:
- The Harbor instance is running and accessible.
- Harbor metrics exposure is enabled (/metrics endpoint is available).
- Network connectivity exists between the vuSmartMaps Cluster and the Harbor metrics endpoint (HTTP/HTTPS port must be reachable).
- The correct protocol and port are configured (e.g.,
http://host:port/metricsorhttps://host:port/metrics).
If HTTPS is enabled:
- Valid SSL certificates are configured (or certificate verification settings are adjusted accordingly).
- Required authentication credentials (Basic Auth / Bearer token, if enabled) are available.
- The Harbor components intended for monitoring (core, registry, job service, exporter) are exposing Prometheus-format metrics.
- Firewall rules, security groups, or Kubernetes network policies allow scraping from the Telegraf collector.
Configuration Steps
Enablethe O11ySource.- Select the sources tab and press the
+button to add a new instance that has to be monitored. - Provide the required configurations:
- *Name
- *Harbor Endpoint
- *Period [in seconds]
- *Credential
- Click
Saveto close the data source window.
Metrics Collected
| Name | Description | Data Type |
|---|---|---|
| @timestamp | Timestamp when the metric was collected | DateTime64(3) |
| timestamp | Detailed timestamp with milliseconds | DateTime64(3) |
| hostname | Host that collected the metric | String |
| URL | Harbor metrics endpoint URL scraped | String |
| target | Target Harbor instance being monitored | String |
| Kafka_topic | Kafka topic the metric was received from | String |
| harbor_component | Harbor component exposing the metric (core, registry, jobservice, exporter) | String |
| status_code | HTTP response status code | String |
| component | Harbor component health-checked (core, database, redis, registry, etc.) | String |
| project_name | Harbor project name | String |
| type | Project or task type | String |
| method | HTTP request method | String |
| operation | API operation name | String |
| handler | Registry HTTP handler name | String |
| node | Job service worker node | String |
| pool | Job service worker pool ID | String |
| workers | Number of workers in the job service pool | String |
| harbor_up | Whether the Harbor endpoint is reachable (1 = up, 0 = down) | UInt8 |
| harbor_health | Health status of Harbor or its component (1 = healthy, 0 = unhealthy) | UInt8 |
| harbor_system_info | Harbor system information metric (always 1, details in labels) | UInt8 |
| harbor_project_total | Total number of projects | UInt32 |
| harbor_project_repo_total | Total number of repositories in the project | UInt32 |
| harbor_project_member_total | Total number of members in the project | UInt32 |
| harbor_artifact_pulled | Total number of artifacts pulled | UInt64 |
| harbor_project_quota_byte | Storage quota of the project in bytes (-1 = unlimited) | Int64 |
| harbor_project_quota_usage_byte | Storage used by the project in bytes | UInt64 |
| harbor_task_queue_size | Number of tasks in the job service queue | UInt32 |
| harbor_task_queue_latency | Time the oldest task has been waiting in the queue in seconds | Float64 |
| harbor_task_scheduled_total | Total number of scheduled tasks | UInt64 |
| harbor_core_http_request_total | Total number of HTTP requests handled by Harbor core | UInt64 |
| harbor_core_http_inflight_requests | Number of in-flight HTTP requests in Harbor core | UInt32 |
| harbor_core_http_request_duration_seconds | Harbor core HTTP request duration in seconds | Float64 |
| harbor_core_http_request_duration_seconds_count | Number of observations of Harbor core HTTP request duration | UInt64 |
| harbor_core_http_request_duration_seconds_sum | Sum of all observed Harbor core HTTP request durations in seconds | Float64 |
| registry_http_in_flight_requests | Number of in-flight HTTP requests in the registry | UInt32 |
| harbor_jobservice_info | Harbor job service information metric (always 1, details in labels) | UInt8 |
| version | Harbor version | String |
| _raw_message | Raw message received from Kafka before parsing | String |
| _error | Parsing/ingestion error message, if any | String |
