coreos/registry-monitor

Name: registry-monitor

Owner: CoreOS

Description: a simple server that pushes and pulls to a registry

Created: 2015-10-21 18:57:40.0

Updated: 2018-05-24 08:17:10.0

Pushed: 2018-04-12 20:22:31.0

Homepage:

Size: 40

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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 |

gistry-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:

er 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:

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.