diff --git a/lxc1/p3-agents/cadvisor.yml b/lxc1/p3-agents/cadvisor.yml index dc32f0c..6800060 100644 --- a/lxc1/p3-agents/cadvisor.yml +++ b/lxc1/p3-agents/cadvisor.yml @@ -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 \ No newline at end of file diff --git a/lxc1/p3-agents/node-exporter.yml b/lxc1/p3-agents/node-exporter.yml index aa4dbf3..e33ca33 100644 --- a/lxc1/p3-agents/node-exporter.yml +++ b/lxc1/p3-agents/node-exporter.yml @@ -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' \ No newline at end of file