mirror of
https://github.com/wahyd4/docker-hub-exporter.git
synced 2026-08-09 04:46:34 +10:00
Updated following feedback
This commit is contained in:
@@ -37,14 +37,14 @@ docker-hub-exporter:
|
||||
Metrics will be made available on port 9170 by default
|
||||
|
||||
```
|
||||
# HELP docker_hub_pull_total counter of docker_pulls from the public API
|
||||
# TYPE docker_hub_pull_total counter
|
||||
docker_hub_pull_total{image="prometheus",user="prom"} 5391416.0
|
||||
docker_hub_pull_total{image="node-exporter",user="prom"} 9790019.0
|
||||
# HELP docker_hub_star_total gauge of docker_stars from the public API
|
||||
# TYPE docker_hub_star_total gauge
|
||||
docker_hub_star_total{image="prometheus",user="prom"} 133.0
|
||||
docker_hub_star_total{image="node-exporter",user="prom"} 16.0
|
||||
# HELP docker_hub_pulls_total counter of docker_pulls from the public API
|
||||
# TYPE docker_hub_pulls_total counter
|
||||
docker_hub_pulls_total{image="prometheus",user="prom"} 5476894.0
|
||||
docker_hub_pulls_total{image="node-exporter",user="prom"} 10103713.0
|
||||
# HELP docker_hub_stars gauge of docker_stars from the public API
|
||||
# TYPE docker_hub_stars gauge
|
||||
docker_hub_stars{image="prometheus",user="prom"} 136.0
|
||||
docker_hub_stars{image="node-exporter",user="prom"} 16.0
|
||||
```
|
||||
|
||||
## Metadata
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ class HubCollector(object):
|
||||
def collect(self):
|
||||
images = os.getenv('IMAGES', default="thebsdbox/ovcli, rucknar/prom-conf").replace(' ','').split(",")
|
||||
print("Starting exporter")
|
||||
self._pull_metrics = CounterMetricFamily('docker_hub_pull_total', 'counter of docker_pulls from the public API', labels=["image", "user"])
|
||||
self._star_metrics = GaugeMetricFamily('docker_hub_star_total', 'gauge of docker_stars from the public API', labels=["image", "user"])
|
||||
self._pull_metrics = CounterMetricFamily('docker_hub_pulls_total', 'counter of docker_pulls from the public API', labels=["image", "user"])
|
||||
self._star_metrics = GaugeMetricFamily('docker_hub_stars', 'gauge of docker_stars from the public API', labels=["image", "user"])
|
||||
|
||||
for image in images:
|
||||
print("Getting JSON for " + image)
|
||||
|
||||
Reference in New Issue
Block a user