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 NameUnit
harbor_storage_free

Amount of free storage
Storage Freebytes
harbor_storage_total

Storage Total
Storage Totalbytes
harbor_public_repo_count

Count of public repo
Public Repo Count
harbor_private_repo_count

Count of private repo
Private Repo Count
harbor_total_project_count

Total project count
Total Project Count