version: "3.9" services: grafana: image: grafana/grafana:9.3.6-ubuntu ports: - "3000:3000" volumes: - grafana-data:/var/lib/grafana - ./configs/grafana/datasources:/etc/grafana/provisioning/datasources/ - ./configs/grafana/dashboards:/etc/grafana/provisioning/dashboards/ prometheus: image: prom/prometheus:v2.42.0 ports: - "9090:9090" # Change 127.0.0.1 to ip address of node where docker satck is deployed command: - "--config.file=/etc/prometheus/prometheus.yml" - "--storage.tsdb.path=/prometheus" - "--web.external-url=http://127.0.0.1:9090" - "--web.console.libraries=/usr/share/prometheus/console_libraries" - "--web.console.templates=/usr/share/prometheus/consoles" volumes: - prom-data:/prometheus - ./configs/prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml - ./configs/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml alertmanager: image: prom/alertmanager:v0.25.0 ports: - "9093:9093" # Change 127.0.0.1 to ip address of node where docker satck is deployed command: - "--config.file=/etc/alertmanager/alertmanager.yml" - "--storage.path=/alertmanager" - "--web.external-url=http://127.0.0.1:9093" volumes: - alert-data:/alertmanager - ./configs/alertmanager.yml:/etc/alertmanager/alertmanager.yml node-exporter: image: prom/node-exporter:v1.5.0 ports: - "9100:9100" volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro command: - '--path.procfs=/host/proc' - '--path.sysfs=/host/sys' - '--collector.filesystem.mount-points-exclude' - '^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)' cadvisor: image: gcr.io/cadvisor/cadvisor:v0.47.0 ports: - 8080:8080 volumes: - /:/rootfs:ro - /var/run:/var/run:rw - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro volumes: grafana-data: prom-data: alert-data: