Created
March 2, 2026 16:10
-
-
Save jonathanmach/8cf5979f185d27e08ec5858caf52b6c8 to your computer and use it in GitHub Desktop.
Grafana setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| prometheus: | |
| image: prom/prometheus:latest | |
| container_name: prometheus | |
| volumes: | |
| - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro | |
| - prometheus_data:/prometheus | |
| command: | |
| - --config.file=/etc/prometheus/prometheus.yml | |
| - --storage.tsdb.retention.time=30d | |
| ports: | |
| - "9092:9090" | |
| restart: unless-stopped | |
| grafana: | |
| image: grafana/grafana:latest | |
| container_name: grafana | |
| volumes: | |
| - grafana_data:/var/lib/grafana | |
| ports: | |
| - "3002:3000" | |
| restart: unless-stopped | |
| node-exporter: | |
| image: prom/node-exporter:latest | |
| container_name: node-exporter | |
| # Important: mount host paths so you get real host metrics | |
| pid: host | |
| network_mode: host | |
| command: | |
| - --path.rootfs=/host | |
| - --collector.processes | |
| volumes: | |
| - /:/host:ro,rslave | |
| restart: unless-stopped | |
| volumes: | |
| prometheus_data: | |
| grafana_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment