# Managed by Ansible (role monitoring_agent). services: node-exporter: image: prom/node-exporter:{{ monitoring_node_exporter_version }} container_name: node-exporter command: - --path.rootfs=/host - --web.listen-address={{ vpc_ip }}:{{ monitoring_node_exporter_port }} - --collector.textfile.directory=/textfile - --collector.filesystem.mount-points-exclude=^/(dev|proc|run|sys|var/lib/docker/.+)($|/) network_mode: host pid: host volumes: - /:/host:ro,rslave - {{ monitoring_textfile_dir }}:/textfile:ro restart: unless-stopped mem_limit: 64m cadvisor: image: ghcr.io/google/cadvisor:{{ monitoring_cadvisor_version }} container_name: cadvisor command: - --listen_ip={{ vpc_ip }} - --port={{ monitoring_cadvisor_port }} - --docker_only=true - --housekeeping_interval=30s - --store_container_labels=false - --whitelisted_container_labels=com.docker.compose.project,com.docker.compose.service - --disable_metrics=percpu,sched,tcp,udp,hugetlb,referenced_memory,cpu_topology,resctrl,advtcp,process network_mode: host privileged: true devices: - /dev/kmsg volumes: - /:/rootfs:ro - /var/run:/var/run:ro - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro - /dev/disk/:/dev/disk:ro restart: unless-stopped mem_limit: 192m alloy: image: grafana/alloy:{{ monitoring_alloy_version }} container_name: alloy command: - run - --server.http.listen-addr={{ vpc_ip }}:12345 - --storage.path=/var/lib/alloy/data - /etc/alloy/config.alloy network_mode: host volumes: - ./config.alloy:/etc/alloy/config.alloy:ro - /var/run/docker.sock:/var/run/docker.sock:ro - /var/log/journal:/var/log/journal:ro - /run/log/journal:/run/log/journal:ro - /etc/machine-id:/etc/machine-id:ro {% if inventory_hostname == 'asxpio-ops' %} - /opt/traefik/logs:/traefik-logs:ro {% endif %} - alloy-data:/var/lib/alloy/data restart: unless-stopped mem_limit: 256m volumes: alloy-data: