r/opnsense • u/tritondm • 7h ago
snia-net-mon - lightweight network flow monitor, running with OPNsense (40+ Vlans)
Hi,
I got tired of deploying heavy monitoring stacks like InfluxDB, Prometheus or Grafana just to keep an eye on local traffic spikes and weird network behavior, so Claudia and I built a small tool in Rust for it.
It's been running for 2 months on our OPNsense environment with over 40 vlans, without an issue. we are now able to find some update issues and suspicious traffic for free..
Repo: https://github.com/tritondm/snia-net-mon
It captures flows and stores aggregated metrics in hourly SQLite files (keeps writes fast and cleanup simple). It learns what's normal for each part of the network and warns you when something is off, e.g. a device suddenly uploading much more than usual. No thresholds to set. (Technically: EWMA / Z-score, details here: https://github.com/tritondm/snia-net-mon/blob/main/FEATURES.md#anomaly-detection).
You can try it out with Docker:
git clone https://github.com/tritondm/snia-net-mon
cd snia-net-mon
docker compose --profile demo up -d # web UI on :8080, with demo traffic
Since this is still an active side project, I'd love some feedback on the Rust codebase, SQLite performance under higher packet load, or how you handle lightweight anomaly detection in your own setups.
any feedback is welcome.
greets
Edit:
details on storage / SQLite ->
https://github.com/tritondm/snia-net-mon/blob/main/FEATURES.md#pre-aggregation-statistics-with-heavy-traffic
