Updated following feedback

This commit is contained in:
Edward Marshall
2016-09-12 08:13:46 +01:00
parent 3970bfa98d
commit c49bdb791f
2 changed files with 10 additions and 10 deletions
+8 -8
View File
@@ -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
View File
@@ -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)