docker-exporter
is a Prometheus exporter that exposes detailed metrics about running Docker containers. It provides information on CPU usage, memory usage, network usage, I/O, volume size for each container, as well as for child processes.
- Detailed per-container metrics:
- CPU usage (user, kernel)
- Memory usage
- Network usage (bytes received/sent)
- I/O usage (bytes read/written)
- Optional volume metrics
- Optional child process metrics
- Flexible configuration:
- Ability to filter monitored containers (Docker Compose only)
- Docker installed and running
- Prometheus installed and configured
-
Pull the Docker image:
docker pull blackprism/docker-exporter
-
Run the
docker-exporter
container with configuration flags:docker run -d \ -p 9100:9100 \ -v /var/lib/docker:/var/lib/docker \ -v /var/run/docker.sock:/var/run/docker.sock \ blackprism/docker-exporter \ --port=9100 \ --rootfs=/ \ --volume=true
Add the docker-exporter
target to your Prometheus configuration (prometheus.yml
):
scrape_configs:
- job_name: 'docker'
static_configs:
- targets: ['<docker-exporter-ip>:9100']