Devops

Grafana , Prometheus monitoring

Struktur Grafana,Prometheus

Ada 2 jenis volume yang boleh buatkan kekeliruan :

Syntax Type Where data is stored Description
- grafana_data:/var/lib/grafana Named volume Inside Docker’s internal volume storage (e.g. /var/lib/docker/volumes/...) Docker manages it automatically. You don’t see it directly on your host. Persistent between container recreations.
- ./data/grafana:/var/lib/grafana Bind mount In your project folder (./data/grafana) Files are directly visible and editable on your host. You must create the folder first.

 

Aspect Named Volume Bind Mount
Visibility Hidden inside Docker Visible in your project folder
Created automatically ✅ Yes ❌ No (you must create it)
Backup manually Harder Easy (just copy folder)
Portability Great for production Great for local development
Performance Slightly faster (Docker optimized) Slightly slower on some OS (esp. macOS)

 

  • Use named volume (grafana_data:) → for clean, persistent production setup
  • Use bind mount (./data/grafana:) → for local visibility / debugging

 

Back to top button