jabley / dockerhub_exporter

Prometheus Exporter for DockerHub rate limits

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

[Docker Repository on Quay][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

Go Report Card Maintainability

Building

go build

Testing

Build Status Test Coverage

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.

About

Prometheus Exporter for DockerHub rate limits

License:MIT License


Languages

Language:Go 95.5%Language:Dockerfile 4.5%