Fix wrong mailing list link
Add README.md
Add dockerhub_rate_limit_up metrics
Custom prometheus exporter that exposes the current rate limit information from DockerHub.
Both anonymous and authenticated rate limit information is supported. To login,
you can either use the -dockerhub-username
and -dockerhub-password
flags, or
use the environment variables DOCKERHUB_USERNAME
and DOCKERHUB_PASSWORD
.
If you are behind a proxy, you can set the HTTPS_PROXY
environment variable to
configure the proxy. You can also use the -ca-cert
flag to specify the root CA
cert.
The following metrics are exposed by this custom exporter.
dockerhub_rate_limit_up
Flag whether the last rate limit request to dockerhub was successful or not (1 = success, 0 = failure)
dockerhub_rate_limit_limit
The maximum number of pull that can be done within the specified interval
dockerhub_rate_limit_remaining
The number of pull remaining before reaching the limit
dockerhub_rate_limit_seconds
The interval in seconds at which the limit applies
To build, run the following command.
go build
Usage of ./dockerhub-ratelimit-exporter:
-ca-cert string
The CA cert to trust when querying docker hub
-listen-addr string
The address the exporter will listen on (default ":8080")
-password string
The Dockerhub password
-username string
The Dockerhub username or user id
See LICENSE.
Patches welcomed at the following mailing list: https://lists.sr.ht/~tomleb/public-inbox.