Harbor is an open source registry that secures artifacts with policies and role-based access control, ensures images are scanned and free from vulnerabilities, and signs images as trusted. Harbor, a CNCF Graduated project, delivers compliance, performance, and interoperability to help you consistently and securely manage artifacts across cloud native compute platforms like kubernetes and Docker.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

harbor:
- name: harbor
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2
  

Configuring the application

Docker environment

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml

- name: harbor
  container-checks:
    image-check:
      - nginx-photon
    port-check:
      - 80
      - 8080  

Kubernetes environment

Configure the application in config.yaml

- name: harbor
  container-checks:
    image-check:
      - nginx-photon
    port-check:
      - 80
      - 8080
  

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Metrics

OpsRamp MetricMetric Display NameUnitDescription
harbor_storage_freeStorage FreebytesAmount of free storage
harbor_storage_totalStorage TotalbytesStorage Total
harbor_public_repo_countPublic Repo CountCount of public repo
harbor_private_repo_countPrivate Repo CountCount of private repo
harbor_total_project_countTotal Project CountTotal project count