This Python script (docker_exporter.py) is a simple Prometheus exporter that collects metrics from Docker containers and exposes them on an HTTP endpoint. The exported metrics cover:
Metrics are labeled with the container name and short container ID, making it easy to identify individual containers in Prometheus.
docker Python SDK.Gauge metricsAdd a job to your Prometheus configuration pointing at the exporter:
scrape_configs:
- job_name: 'docker_exporter'
static_configs:
- targets: ['<exporter_host>:9101']
Replace <exporter_host> with the hostname or IP where the exporter is running (e.g. localhost).
Restart Prometheus after updating its config.
Content type
Image
Digest
sha256:4130ba104…
Size
48.7 MB
Last updated
7 months ago
docker pull tdsdockerhub/docker-exporter