A real-time network monitoring tool built in Go that continuously tests network connectivity by pinging multiple remote hosts and provides a beautiful web dashboard for visualization.
I created this tool originally because the constant network issues I have been with the Malaysia broadband internet provider UniFi. I need a way to track downtime history and retain logs as a prove to them since they always do not honor the SLAs.
✅ Continuous Network Monitoring: Pings multiple hosts (Google, Apple, Cloudflare, GitHub) every 30 seconds
✅ Persistent Logging: All results saved to local JSON log files
✅ Web Dashboard: Real-time visualization with dark theme
✅ Downtime Detection: Automatically tracks and highlights connectivity issues
✅ Time Range Selection: Filter data by custom date/time ranges
✅ Statistics: Per-host uptime percentages, latency metrics, and failure counts
✅ Auto-refresh: Dashboard updates every 30 seconds
- Go 1.24 or higher
- Network connectivity to test hosts
# 1. Copy and configure environment variables
cp .env.example .env
# 2. Edit .env to set your hosts and interval
# 3. Start with Docker Compose
docker-compose up -d
# 4. View logs
docker-compose logs -f monitrix
# 5. Access dashboard at http://localhost:8080Once running, open your browser to:
http://localhost:8080
The application will:
- Start monitoring network connectivity to configured hosts
- Log results to
data/network_monitor_YYYY-MM-DD.jsonl - Print ping results to console
- Serve the web dashboard on port 8080
Via Environment Variables (Recommended):
| Variable | Default | Description |
|---|---|---|
MONITOR_HOSTS |
google.com,rexlow.com,github.com |
Comma-separated hosts |
MONITOR_INTERVAL |
30 |
Check interval in seconds |
WEB_ADDR |
0.0.0.0:8080 |
Web server address |
internal/monitor/ping.go: Core ping/connectivity testing logicinternal/storage/file.go: File-based logging systeminternal/api/server.go: HTTP API and statistics calculationcmd/monitrix/main.go: Application orchestrationweb/index.html: Single-page dashboard application
MIT License - Feel free to modify and use as needed!
Built with ❤️ using Go and vanilla JavaScript
