A lightweight host/agent network monitor that measures local gateway and internet latency, stores history in SQLite, and serves a browser dashboard.
- The host runs on your main machine — it monitors itself, listens for agent uploads on port 8765, and serves a live browser dashboard.
- An agent runs on a remote machine (e.g. a Raspberry Pi) — it measures that machine's network latency, buffers samples locally, and syncs to the host even if the host was temporarily offline.
cd netmon
cargo build --releaseBinary: target/release/netmon (or netmon.exe on Windows)
netmon hostDefaults to binding 0.0.0.0:8765 and storing data in netmon-host.db.
Dashboard: http://HOST_IP:8765
Custom bind address or database path:
netmon host --bind 0.0.0.0:9000 --db /data/netmon.dbnetmon agent --host http://192.168.1.50:8765Optional custom name (defaults to the machine's hostname):
netmon agent --host http://192.168.1.50:8765 --name bedroom-piAgents never lose samples if the host is temporarily offline:
- Agent records a sample locally in SQLite.
- Agent sends batches to the host
/ingestendpoint. - Host acknowledges the highest sequence number it received.
- Agent deletes only acknowledged rows.
When the host comes back online, agents automatically backfill all missing data.
| Metric | Warn | Critical |
|---|---|---|
| Local latency | 5 ms | 10 ms |
| Internet latency | 25 ms | 45 ms |
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Browser dashboard |
/api/nodes |
GET | List all monitored nodes |
/api/history/:node |
GET | 1-hour latency history for a node |
/ingest |
POST | Agent data upload endpoint |
- Host:
netmon-host.db - Agent:
netmon-agent.db
Press Ctrl+C. Safe to restart at any time — agents resume from their local queue.