Skip to content

Instantly share code, notes, and snippets.

@sevket-yilmaz
Created August 14, 2021 11:47
Show Gist options
  • Save sevket-yilmaz/2eb051f873c161fa9c0d8dfb3a1e0fc9 to your computer and use it in GitHub Desktop.
Save sevket-yilmaz/2eb051f873c161fa9c0d8dfb3a1e0fc9 to your computer and use it in GitHub Desktop.
Installing Grafana, Prometheus & Node Exporter docker compose file
version: "3.7"
networks:
monitor-network:
driver: bridge
services:
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- /monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- 9090:9090
restart: unless-stopped
networks:
- monitor-network
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
restart: unless-stopped
networks:
- monitor-network
nodeexporter:
image: prom/node-exporter
container_name: node_exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- 9100:9100
restart: unless-stopped
networks:
- monitor-network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment