How yussf101/monitoring-stack-with-grafana works
Project type and purpose
• This is a Docker-based monitoring stack for Linux servers. It’s not a traditional “web app,” but an infrastructure/monitoring platform.
• The stack comprises three main services:
• Node Exporter running on each client VM to expose system metrics.
• Prometheus running in Docker on a central monitoring server to scrape and store those metrics.
File structure
• Top level:
• docker-compose.yml – orchestrates Grafana, Prometheus (and optionally a provisioned datasource).
• generate-prometheus-config.sh + vm_list.txt – a script + input file to dynamically produce prometheus.yml from the template.
• prometheus/
• prometheus.template.yml – contains a placeholder for ${VM_LIST} that the script replaces with the contents of vm_list.txt.
• prometheus.yml – the generated config listing all node_exporter targets.
• grafana/
• grafana.ini – Grafana’s core settings (ports, auth).
• provisioning/datasources – auto-provisions Prometheus as a data source.
• provisioning/dashboards – three JSON dashboards (minimal, main, advanced).
• provisioning/variables – defines dashboard variables (e.g. instance dropdown).
README for additional insights
• The README confirms the data flow: Node Exporter → Prometheus → Grafana.
• It describes how to add new VMs: edit vm_list.txt, re-run the script, restart Prometheus.
• It highlights that advanced dashboards require Node Exporter run as a systemd service with extra collectors.