Skip to content

Commit 22d1049

Browse files
Eisha KaushalEisha Kaushal
authored andcommitted
docker container metrics scraped by prometheus
1 parent 9736fe8 commit 22d1049

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/docker/docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ services:
8484
cadvisor:
8585
image: gcr.io/cadvisor/cadvisor:latest
8686
container_name: cadvisor
87+
privileged: true
8788
ports:
8889
- 8080:8080
8990
volumes:
9091
- /:/rootfs:ro
91-
- /var/run:/var/run:rw
92+
- /etc/machine-id:/etc/machine-id:ro
93+
- /var/run/docker.sock:/var/run/docker.sock:rw
9294
- /sys:/sys:ro
9395
- /var/lib/docker/:/var/lib/docker:ro
9496
depends_on:

examples/docker/prometheus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ scrape_configs:
1919
scrape_interval: 5s
2020
static_configs:
2121
- targets:
22-
- cadvisor:8080
22+
- docker.for.mac.localhost:8080
2323
# - job_name: 'frontend'
2424
# static_configs:
2525
# - targets: ['localhost:3333']

0 commit comments

Comments
 (0)