GoNetworkMonitor
A commercial-grade, high-performance network monitoring tool written in Go.
Real-time packet capture, deep protocol analysis, and a beautiful web dashboard โ all in a single binary.
Download Latest Release ยท Report Bug ยท Request Feature
Overview
GoNetworkMonitor is a production-ready network analysis platform built for network engineers, security professionals, and system administrators. It leverages Go's concurrency model and the battle-tested gopacket library to deliver deep packet inspection with minimal resource overhead, served through a modern real-time web dashboard accessible from any browser.
Features
| Category |
Capabilities |
| Packet Capture |
Real-time capture via gopacket/libpcap, BPF filter support, promiscuous mode |
| Protocol Analysis |
TCP, UDP, ICMP, ICMPv6, DNS, HTTP, ARP, IPv4, IPv6 |
| Dashboard |
Real-time traffic charts, protocol distribution, top talkers, connection table |
| API |
REST API + WebSocket streaming for live data integration |
| Alerting |
Configurable bandwidth and PPS thresholds with alert history |
| Connection Tracking |
Active connection table with packet/byte counters |
| Configuration |
JSON config file + live API-based updates |
| Deployment |
Single binary, Docker support, multi-platform |
Quick Start
Prerequisites
- Linux (recommended) or macOS
libpcap installed (sudo apt-get install libpcap-dev or brew install libpcap)
- Root/Administrator privileges (required for raw packet capture)
Download Pre-built Binary
# Linux (amd64)
curl -LO https://github.com/Ali-Marandi/GoNetworkMonitor/releases/latest/download/gonetmon-v2.0.0-linux-amd64.tar.gz
tar -xzf gonetmon-v2.0.0-linux-amd64.tar.gz
sudo ./gonetmon-linux-amd64
Then open your browser at http://localhost:8080
Build from Source
# Clone the repository
git clone https://github.com/Ali-Marandi/GoNetworkMonitor.git
cd GoNetworkMonitor
# Install dependencies
sudo apt-get install -y libpcap-dev gcc
# Build
make build
# Run
sudo ./dist/gonetmon
Docker
docker run --rm \
--cap-add=NET_ADMIN \
--cap-add=NET_RAW \
--network=host \
-p 8080:8080 \
ghcr.io/ali-marandi/gonetworkmonitor:latest
Usage
Usage of gonetmon:
-config string Path to configuration file (default "config.json")
-interface string Network interface to monitor (default: auto-detect)
-port int Override listen port
-version Print version and exit
Examples
# Auto-detect interface, default port 8080
sudo ./gonetmon
# Monitor specific interface
sudo ./gonetmon -interface eth0
# Custom port and config
sudo ./gonetmon -interface eth0 -port 9090 -config /etc/gonetmon/config.json
Configuration
GoNetworkMonitor uses a JSON configuration file (config.json). All settings can also be updated live via the web dashboard.
{
"listen_addr": "0.0.0.0",
"port": 8080,
"interface": "auto",
"snap_len": 65535,
"promiscuous": true,
"bpf_filter": "",
"alerts": {
"enabled": true,
"bandwidth_mbps_threshold": 100,
"pps_threshold": 10000,
"new_conn_per_second_threshold": 500
},
"data_dir": "./data",
"max_history_seconds": 3600
}
REST API Reference
| Method |
Endpoint |
Description |
GET |
/api/interfaces |
List available network interfaces |
POST |
/api/capture/start |
Start packet capture |
POST |
/api/capture/stop |
Stop packet capture |
GET |
/api/capture/status |
Get capture status |
GET |
/api/stats/snapshot |
Current statistics snapshot |
GET |
/api/stats/timeseries |
Historical time-series data |
GET |
/api/stats/connections |
Active connection table |
GET |
/api/alerts |
Recent alerts |
GET/POST |
/api/config |
Get or update configuration |
WS |
/api/ws |
WebSocket stream for real-time stats |
Architecture
GoNetworkMonitor/
โโโ cmd/gonetmon/ # Application entry point
โโโ pkg/
โ โโโ capture/ # Packet capture engine (gopacket/libpcap)
โ โโโ api/ # REST API + WebSocket server
โ โโโ stats/ # Time-series and connection tracking
โ โโโ alert/ # Alert management and threshold checking
โ โโโ config/ # Configuration management
โโโ web/
โ โโโ index.html # Dashboard SPA
โ โโโ static/
โ โโโ css/style.css # Modern dark theme
โ โโโ js/app.js # Dashboard logic + Chart.js
โโโ .github/workflows/ # CI/CD pipelines
โโโ Dockerfile
โโโ Makefile
Performance
GoNetworkMonitor is designed for high-throughput environments. It uses non-blocking packet processing via buffered Go channels, lock-free atomic counters for hot-path statistics, a WebSocket push model that eliminates polling overhead, and minimal memory allocations in the capture hot path.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'feat: add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
License
This project is licensed under the MIT License โ see the LICENSE file for details.