Skip to main content
Version: NG-2.16

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 IPDestination IPDestination PortProtocolDirection
vuSmartMaps IPHarbor endpoint9090*TCPOutbound

*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/metrics or https://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​

  • Enable the 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 Save to close the data source window.

Metrics Collected​

NameDescriptionData Type
@timestampTimestamp when the metric was collectedDateTime64(3)
timestampDetailed timestamp with millisecondsDateTime64(3)
hostnameHost that collected the metricString
URLHarbor metrics endpoint URL scrapedString
targetTarget Harbor instance being monitoredString
Kafka_topicKafka topic the metric was received fromString
harbor_componentHarbor component exposing the metric (core, registry, jobservice, exporter)String
status_codeHTTP response status codeString
componentHarbor component health-checked (core, database, redis, registry, etc.)String
project_nameHarbor project nameString
typeProject or task typeString
methodHTTP request methodString
operationAPI operation nameString
handlerRegistry HTTP handler nameString
nodeJob service worker nodeString
poolJob service worker pool IDString
workersNumber of workers in the job service poolString
harbor_upWhether the Harbor endpoint is reachable (1 = up, 0 = down)UInt8
harbor_healthHealth status of Harbor or its component (1 = healthy, 0 = unhealthy)UInt8
harbor_system_infoHarbor system information metric (always 1, details in labels)UInt8
harbor_project_totalTotal number of projectsUInt32
harbor_project_repo_totalTotal number of repositories in the projectUInt32
harbor_project_member_totalTotal number of members in the projectUInt32
harbor_artifact_pulledTotal number of artifacts pulledUInt64
harbor_project_quota_byteStorage quota of the project in bytes (-1 = unlimited)Int64
harbor_project_quota_usage_byteStorage used by the project in bytesUInt64
harbor_task_queue_sizeNumber of tasks in the job service queueUInt32
harbor_task_queue_latencyTime the oldest task has been waiting in the queue in secondsFloat64
harbor_task_scheduled_totalTotal number of scheduled tasksUInt64
harbor_core_http_request_totalTotal number of HTTP requests handled by Harbor coreUInt64
harbor_core_http_inflight_requestsNumber of in-flight HTTP requests in Harbor coreUInt32
harbor_core_http_request_duration_secondsHarbor core HTTP request duration in secondsFloat64
harbor_core_http_request_duration_seconds_countNumber of observations of Harbor core HTTP request durationUInt64
harbor_core_http_request_duration_seconds_sumSum of all observed Harbor core HTTP request durations in secondsFloat64
registry_http_in_flight_requestsNumber of in-flight HTTP requests in the registryUInt32
harbor_jobservice_infoHarbor job service information metric (always 1, details in labels)UInt8
versionHarbor versionString
_raw_messageRaw message received from Kafka before parsingString
_errorParsing/ingestion error message, if anyString