A comprehensive monitoring solution for homelab infrastructure using Prometheus, Grafana, and various exporters. This stack provides detailed insights into system performance, container metrics, and network statistics. 📊
This is duplicated in my homelab-compose repo but I keep this here for public access
-
System Monitoring 🖥️
- CPU utilization (user, system, I/O wait)
- Memory usage and swap
- Disk I/O and usage
- Network traffic (per interface)
-
Container Monitoring 🐳
- Container CPU usage
- Container memory usage
- Container network I/O
- Container disk usage
-
Network Monitoring 🌐
- Internet speed monitoring (download/upload)
- Network interface statistics
- Network traffic analysis via Wireshark
- Prometheus: Time series database for metrics storage 📝
- Grafana: Visualization and dashboarding 📈
- Node Exporter: System metrics collection 🔍
- cAdvisor: Container metrics collection 🐋
- Speedtest Exporter: Internet speed monitoring 🚀
- Wireshark: Network traffic analysis 🔎
- SMART Monitoring: Disk health monitoring 💾
- Docker and Docker Compose
- Linux-based system
- Sufficient disk space for metrics storage
- Root/sudo access for container privileges
- Clone the repository:
git clone https://github.com/Doomlab7/homelab-monitoring.git
cd homelab-monitoring- Configure environment variables:
cp .env.example .env
# Edit .env with your specific configurations- Start the monitoring stack:
docker compuse up -d
- Access Grafana:
- Open
http://localhost:3000in your browser (or your chosen port) - Default credentials are in your
.envfile 🔑
The monitoring stack comes with a pre-configured dashboard that includes:
-
System Metrics 🖥️
- CPU utilization broken down by type (user, system, I/O wait)
- Memory usage with swap monitoring
- Disk I/O per device
- Network traffic per interface
-
Container Metrics 🐳
- Resource usage per container
- Network I/O per container
- Container status monitoring
-
Network Monitoring 🌐
- Internet speed tracking (scraped every hour - configured in ./config/prometheus/prometheus.yml)
- Network interface statistics
- Detailed traffic analysis
- Configuration file:
config/prometheus/prometheus.yml - Scrape intervals and targets can be modified here
- Job configurations for all exporters
- Dashboards:
config/grafana/dashboards/ - Data sources:
config/grafana/provisioning/datasources/ - Dashboard provisioning:
config/grafana/provisioning/dashboards/
- Metrics data is persisted in Docker volumes
- Regular backups of the Prometheus and Grafana volumes are recommended
- Monitor disk usage of the metrics volume
Contributions are welcome! Please feel free to submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details