Docker Hub Exporter for Prometheus
This is a simple server that scrapes Docker Hub rate limit stats and exports them via HTTP for
Prometheus consumption.
Getting Started
To run it:
./dockerhub_exporter [flags]
Help on flags:
./dockerhub_exporter -help
For more information check the source code documentation.
Usage
By default, it will try to use anonymous access to report on rate limits.
If you want to use an authenticated account, you can pass in your username and password using:
dockerhub_exporter -user=<user_name> -pass=<pass_phrase>
Docker
[][quay]
To run the Docker Hub exporter as a Docker container, run:
docker run -p 9090:9090 quay.io/jabley/dockerhub_exporter:v0.9.0
Development
Building
go build
Testing
go test ./...
The test coverage number is interesting. Since this is (for now) a small service, it flags that all
the func main()
bit which parses command line args isn't tested. But if you look at the report,
all of the service logic has good coverage.
License
MIT, see LICENSE.