mirror of
https://github.com/wahyd4/docker-hub-exporter.git
synced 2026-08-09 04:46:34 +10:00
Updated metric names to be compliant with naming guidelines
This commit is contained in:
@@ -38,13 +38,13 @@ Metrics will be made available on port 1234 by default
|
||||
|
||||
```
|
||||
# HELP docker_hub_pull_count counter of docker_pulls from the public API
|
||||
# TYPE docker_hub_pull_count counter
|
||||
docker_hub_pull_count{image="prometheus",user="prom"} 5360660.0
|
||||
docker_hub_pull_count{image="node-exporter",user="prom"} 9668841.0
|
||||
# HELP docker_hub_star_count counter of docker_stars from the public API
|
||||
# TYPE docker_hub_star_count counter
|
||||
docker_hub_star_count{image="prometheus",user="prom"} 133.0
|
||||
docker_hub_star_count{image="node-exporter",user="prom"} 16.0
|
||||
# TYPE docker_hub_pull_total counter
|
||||
docker_hub_pull_total{image="prometheus",user="prom"} 5360660.0
|
||||
docker_hub_pull_total{image="node-exporter",user="prom"} 9668841.0
|
||||
# HELP docker_hub_star_total counter of docker_stars from the public API
|
||||
# TYPE docker_hub_star_total counter
|
||||
docker_hub_star_total{image="prometheus",user="prom"} 133.0
|
||||
docker_hub_star_total{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_count', 'counter of docker_pulls from the public API', labels=["image", "user"])
|
||||
self._star_metrics = CounterMetricFamily('docker_hub_star_count', 'counter of docker_stars from the public API', labels=["image", "user"])
|
||||
self._pull_metrics = CounterMetricFamily('docker_hub_pull_total', 'counter of docker_pulls from the public API', labels=["image", "user"])
|
||||
self._star_metrics = CounterMetricFamily('docker_hub_star_total', 'counter 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