Coder Social home page Coder Social logo

registry-monitor's Introduction

registry-monitor

Simple go application that monitors a Docker registry by conducting pushes and pulls and reports the status to an HTTP endpoint.

Running the monitor

To run the monitor, execute the following command with the flag values replaced:

Flag Name Description
username The registry username for auth ย 
password The registry password for auth
registry-host The registry hostname. Example: quay.io
repository The full name of the repository. Example: quay.io/some/repository
base-image-id The Docker V1 ID of an image in the repository to use as the base
./registry-monitor -username=USERNAME -password=PASSWORD -registry-host=REGISTRYHOST -repository=registryname/some/repository -base-layer-id=DOCKERV1ID

The monitor can also be run itself via Docker:

docker run --privileged -e UNDER_DOCKER=true -v /var/run/docker.sock:/var/run/docker.sock -p 8000:8000 registry-monitor -username=USERNAME -password=PASSWORD -registry-host=REGISTRYHOST -repository=registryname/some/repository -base-layer-id=DOCKERV1ID

Docker Example:

docker run --privileged -e UNDER_DOCKER=true -v /var/run/docker.sock:/var/run/docker.sock -p 8000:8000 registry-monitor -username=myuser+robot -password=myrobottoken -registry-host=quay.io -repository=quay.io/myuser/monitorrepo -base-layer-id=4f83eba78c

Reading the monitor

The monitor exposes three HTTP endpoints on port 8000:

/status returns 200 OK if the pull and push has succeeded within the last monitoring period. /health returns 200 OK if the monitor binary itself is healthy. If non-200, the binary should be terminated and restarted. /metrics returns a Prometheus metrics endpoint for retrieving the results of the monitor.

registry-monitor's People

Contributors

atem18 avatar btlyons1 avatar ericchiang avatar gamkiller77 avatar iancward avatar josephschorr avatar jzelinskie avatar kenjones-cisco 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.