mirror of
https://github.com/wahyd4/docker-hub-exporter.git
synced 2026-08-09 04:46:34 +10:00
Update README.md
This commit is contained in:
@@ -4,10 +4,19 @@ Exposes metrics of container pulls and stars from the Docker Hub API, to a Prome
|
||||
|
||||
## Configuration
|
||||
|
||||
The image is setup to take two parameters via command line flags. Below is a list of available flags. You can also find this list by using the `--help` flag.
|
||||
The image is setup to take parameters from environment variables or flags:
|
||||
|
||||
The available environment variables are:
|
||||
|
||||
* `BIND_PORT` The port you wish to run the container on, defaults to 9170
|
||||
* `ORGS` The docker hub organizations you wish to monitor, expected in the format "org1, org2" (Also works for users)
|
||||
* `IMAGES` The images you wish to monitor, expected in the format "user/image1, user/image2". Can be across different dockerhub users.
|
||||
|
||||
|
||||
Below is a list of the available flags. You can also find this list by using the `--help` flag.
|
||||
|
||||
* `images` Images you wish to monitor: expected format 'user/image1,user/image2'
|
||||
* `listen-address` Address on which to expose metrics and web interface. (default ":9171")
|
||||
* `listen-address` Address on which to expose metrics and web interface. (default ":9170")
|
||||
* `organisations` Organisations/Users you wish to monitor: expected format 'org1,org2'
|
||||
* `telemetry-path` Path under which to expose metrics. (default "/metrics")
|
||||
|
||||
@@ -15,14 +24,20 @@ The image is setup to take two parameters via command line flags. Below is a lis
|
||||
|
||||
Run manually from Docker Hub:
|
||||
```
|
||||
docker run -d --restart=always -p 9171:9171 infinityworks/docker-hub-exporter -listen-address=:9171 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="infinityworks"
|
||||
docker run -d --restart=always -p 9170:9170 infinityworks/docker-hub-exporter -listen-address=:9170 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="super6awspoc"
|
||||
```
|
||||
|
||||
Build a docker image:
|
||||
```
|
||||
docker build -t <image-name> .
|
||||
docker run -d --restart=always -p 9171:9171 <image-name> -listen-address=:9171 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="infinityworks"
|
||||
docker run -d --restart=always -p 9170:9170 <image-name> -listen-address=:9170 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="super6awspoc"
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
Currently there is a known issue with this build where if you provide a image or list of images belonging to an organisation
|
||||
that has also been passed into the application then Prometheus will error during metrics gathering reporting that the metric was already collected with the same name and labels.
|
||||
|
||||
## Metrics
|
||||
|
||||
Metrics will be made available on port 8080 by default
|
||||
|
||||
Reference in New Issue
Block a user