update cadvisor and node-eporter compose files

This commit is contained in:
admin 2026-02-06 09:56:20 -07:00
parent 09c70e5e8c
commit 4c0c3a951c
2 changed files with 17 additions and 7 deletions

View file

@ -1,17 +1,23 @@
services:
cadvisor:
image: ghcr.io/google/cadvisor:latest
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
restart: unless-stopped
# 4. PRIVILEGED: Critical for reading hardware stats/OOM kills
privileged: true
devices:
- /dev/kmsg
ports:
- "8082:8080" # remapped to avoid conflict
# 5. PORT MAPPING: keeping your preference (8082)
# Ensure Prometheus targets are updated to use 8082!
- "8082:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro # Good for physical disk I/O stats
command:
- --docker_only
- --store_container_labels=${CADVISOR_STORE_LABELS}
environment:
- TZ=America/Edmonton
restart: unless-stopped
- TZ=America/Edmonton

View file

@ -2,6 +2,10 @@ services:
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
pid: host
network_mode: host
restart: unless-stopped
network_mode: host
pid: host
volumes:
- /:/host:ro,rslave
command:
- '--path.rootfs=/host'