Coder Social home page Coder Social logo

harbor_exporter's Introduction

Prometheus exporter for Harbor

CircleCI

Export harbor service health to Prometheus.

To run it:

make build
./harbor_exporter [flags]

To build a Docker image:

make dockerbuild

Exported Metrics

Metric Meaning Labels
harbor_up
harbor_scans_completed
harbor_scans_total
harbor_scans_requester
harbor_project_count_total type=[private_project, public_project, total_project]
harbor_repo_count_total type=[private_repo, public_repo, total_repo]
harbor_quotas_count_total repo_id, repo_name, type=[hard, used]
harbor_quotas_size_bytes repo_id, repo_name, type=[hard, used]
harbor_system_volumes_bytes storage=[free, total]
harbor_repositories_pull_total repo_id, repo_name
harbor_repositories_star_total repo_id, repo_name
harbor_repositories_tags_total repo_id, repo_name
harbor_replication_status status of the last execution of this replication policy: Succeed = 1, any other status = 0 repl_pol_name
harbor_replication_tasks number of replication tasks, with various results, in the latest execution of this replication policy repl_pol_name, result=[failed, succeed, in_progress, stopped]

Note: when the harbor.instance flag is used, each metric name starts with harbor_instancename_ instead of just harbor_.

Flags

./harbor_exporter --help

Environment variables

Below environment variables can be used instead of the corresponding flags. Easy when running the exporter in a container.

HARBOR_INSTANCE
HARBOR_URI
HARBOR_USERNAME
HARBOR_PASSWORD

Using Docker

You can deploy this exporter using the Docker image.

For example:

docker pull c4po/harbor-exporter

docker run -d -p 9107:9107 -e HARBOR_USERNAME=admin -e HARBOR_PASSWORD=password c4po/harbor-exporter --harbor.server=https://harbor.dev

Run in Kubernetes

if you deploy Harbor to Kubernetes using the helm chart goharbor/harbor-helm, you can use this file kubernetes/harbor-exporter.yaml to deploy the harbor-exporter with secretKeyRef

Using Grafana

You can load this json file grafana/harbor-overview.json to Grafana instance to have the dashboard. screenshot

harbor_exporter's People

Contributors

c4po avatar cmur2 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.