mirror of
https://github.com/wahyd4/docker-hub-exporter.git
synced 2026-08-09 04:46:34 +10:00
Updated metrics listen address/port
This commit is contained in:
@@ -13,6 +13,8 @@ RUN go get \
|
||||
|
||||
FROM alpine
|
||||
|
||||
EXPOSE 9171
|
||||
|
||||
RUN addgroup exporter \
|
||||
&& adduser -S -G exporter exporter \
|
||||
&& apk --update --no-cache add ca-certificates
|
||||
|
||||
@@ -7,7 +7,7 @@ Exposes metrics of container pulls and stars from the Docker Hub API, to a Prome
|
||||
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.
|
||||
|
||||
* `images` Images you wish to monitor: expected format 'user/image1,user/image2'
|
||||
* `listen-address` Address on which to expose metrics and web interface. (default ":8080")
|
||||
* `listen-address` Address on which to expose metrics and web interface. (default ":9171")
|
||||
* `organisations` Organisations/Users you wish to monitor: expected format 'org1,org2'
|
||||
* `telemetry-path` Path under which to expose metrics. (default "/metrics")
|
||||
|
||||
@@ -15,14 +15,18 @@ 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 9170:9170 infinityworks/docker-hub-exporter -listen-address=:9170 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="infinityworks"
|
||||
docker run -d --restart=always -p 9171:9171 infinityworks/docker-hub-exporter -listen-address=:9171 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="infinityworks"
|
||||
```
|
||||
|
||||
Build a docker image:
|
||||
```
|
||||
docker build -t <image-name> .
|
||||
docker run -d --restart=always -p 9170:9170 <image-name> -listen-address=:9170 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="infinityworks"
|
||||
docker run -d --restart=always -p 9171:9171 <image-name> -listen-address=:9171 -images="infinityworks/ranch-eye,infinityworks/prom-conf" -organisations="infinityworks"
|
||||
```
|
||||
## Metrics
|
||||
|
||||
Metrics will be made available on port 8080 by default
|
||||
An example of these metrics can be found in the `METRICS.md` markdown file in the root of this repository
|
||||
|
||||
## Metadata
|
||||
[](http://microbadger.com/images/infinityworks/docker-hub-exporter "Get your own image badge on microbadger.com") [](http://microbadger.com/images/infinityworks/docker-hub-exporter "Get your own version badge on microbadger.com")
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func main() {
|
||||
var (
|
||||
listenAddress = flag.String("listen-address", ":8080", "Address on which to expose metrics and web interface.")
|
||||
listenAddress = flag.String("listen-address", ":9171", "Address on which to expose metrics and web interface.")
|
||||
metricsPath = flag.String("telemetry-path", "/metrics", "Path under which to expose metrics.")
|
||||
organisations = flag.String("organisations", "", "Organisations/Users you wish to monitor: expected format 'org1,org2'")
|
||||
images = flag.String("images", "", "Images you wish to monitor: expected format 'user/image1,user/image2'")
|
||||
|
||||
Reference in New Issue
Block a user