Coder Social home page Coder Social logo

docker-hub-exporter's Introduction

Prometheus Docker Hub Exporter

Exposes metrics of container pulls and stars from the Docker Hub API, to a Prometheus compatible endpoint. The exporter is capable of pulling down stats for individual images, or for orgs or users from DockerHub. This is based on the un-documented V2 Docker Hub API.

Configuration

The image is setup to take parameters from environment variables or flags:

The available environment variables are:

  • BIND_PORT The port you wish to run the container on, defaults to 9170
  • ORGS The docker hub organizations you wish to monitor, expected in the format "org1, org2" (Also works for users)
  • IMAGES The images you wish to monitor, expected in the format "user/image1, user/image2". Can be across different dockerhub users.

Below is a list of the available flags. You can also find this list by using the --help flag.

  • images Images you wish to monitor: expected format 'user/image1,user/image2'
  • listen-address Address on which to expose metrics and web interface. (default ":9170")
  • organisations Organisations/Users you wish to monitor: expected format 'org1,org2'
  • telemetry-path Path under which to expose metrics. (default "/metrics")

Install and deploy

Run manually from Docker Hub:

docker run -d --restart=always -p 9170:9170 infinityworks/docker-hub-exporter -listen-address=:9170 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="super6awspoc"

Build a docker image:

docker build -t <image-name> .
docker run -d --restart=always -p 9170:9170 <image-name> -listen-address=:9170 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="super6awspoc"

Known Issues

Currently there is a known issue with this build where if you provide a image or list of images belonging to an organisation that has also been passed into the application then Prometheus will error during metrics gathering reporting that the metric was already collected with the same name and labels.

Metrics

Metrics will be made available on port 8080 by default An example of these metrics can be found in the METRICS.md markdown file in the root of this repository

Metadata

docker-hub-exporter's People

Contributors

aranw avatar rucknar avatar

Watchers

 avatar  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.