Fast, sharp network intelligence for MSPs and SMBs.
Flintnet is a self-hosted network monitoring platform built for network administrators who need real-time visibility without sending their data to the cloud. It combines a high-performance C++ agent with a Flutter web UI, giving you live traffic flows, device inventory, ARP security detection, anomaly alerting, and network topology — all running on your own infrastructure.
Flintnet consists of two components: a C++ backend agent and a Flutter web frontend. They communicate via a REST API and a persistent SSE stream. All data remains on your infrastructure.
┌─────────────────────────────────────────────────────────────┐
│ Flutter UI │
│ Dashboard · Devices · Security · Topology │
└────────────────────────┬────────────────────────────────────┘
│ REST API + SSE
┌────────────────────────▼────────────────────────────────────┐
│ C++ Agent │
│ │
│ AF_PACKET capture → Flow tracker → Anomaly detector │
│ SNMP poller → ARP walker → Security detector │
│ LLDP/CDP poller → Topology registry │
│ Event bus → Alert store · Email alerter · SSE push │
│ REST API (cpp-httplib) · InfluxDB metrics pipeline │
└────────────────────────┬────────────────────────────────────┘
│
┌────────────────────────▼────────────────────────────────────┐
│ InfluxDB 1.8 │
│ Flows · SNMP metrics · Anomaly records │
└─────────────────────────────────────────────────────────────┘
src/The agent is written in C++20 and runs as a multi-threaded process on a Linux host. It requires NET_RAW and NET_ADMIN capabilities for packet capture.
Packet capture (parser/)
Uses AF_PACKET sockets for zero-copy packet capture across one or more network interfaces. Packets are parsed into flow records keyed by source IP, destination IP, source port, destination port, and protocol. Flow statistics (byte count, packet count, EWMA baseline) are tracked per flow and written to InfluxDB.
Anomaly detection (parser/)
Each flow maintains an Exponentially Weighted Moving Average (EWMA) of its byte volume. When the current measurement deviates significantly above the baseline, an anomaly event is published to the event bus. The EWMA adapts over time as traffic patterns evolve.
Device discovery (discovery/)
CIDR-based discovery scans the configured subnet at startup and on a periodic schedule. Discovered devices are stored in the device registry and persisted to /var/lib/flintnet/devices.json.
SNMP polling (snmp/)
SNMPv2c polling retrieves sysDescr, sysObjectID, interface byte counters (ifInOctets, ifOutOctets), and optionally CPU/memory and routing protocol state from SNMP-reachable devices. Per-interface utilisation percentages are calculated and published via SSE. SNMP traps are received on a dedicated listener thread.
ARP walking and security detection (arp/)
The ARP table is walked periodically via ipNetToMedia MIB. Each entry is tracked in the ARP registry with MAC address, manufacturer (resolved from OUI), first seen, last seen, and IP history. The following security events are detected and published to the event bus:
rogue_device — a MAC address not previously seen on the networkarp_spoof_detected — a single MAC claiming multiple IP addressesarp_spoof_detected — a single IP address claiming multiple MAC addressesduplicate_ips — two devices claiming the same IP addressNetwork topology (snmp/)
LLDP and CDP neighbour data is polled from managed switches and routers. Neighbour system names are resolved to IP addresses by cross-referencing the device registry. The topology is exposed via the REST API for rendering in the Flutter UI.
Event bus (api/)
A publish/subscribe event bus connects all agent subsystems. Producers (ARP walker, anomaly detector, capture pipeline) publish JSON events. Consumers (alert store, email alerter, SSE push, SSE stream) subscribe via a Subscription object backed by a condition variable queue. Subscriptions are lifetime-coupled — the bus automatically prunes disconnected subscribers.
Alert store (notifier/)
A per-device ring buffer (20 entries, keyed by MAC address) stores recent security events. The alert store subscribes to the event bus and is consumed by the /devices/:ip REST endpoint to populate the device detail screen's security alert log.
Email alerting (notifier/)
SMTP email notifications are dispatched via libcurl for all security and anomaly events. A per-device per-event-type 5-minute cooldown prevents alert flooding. SMTP configuration is provided via environment variables.
REST API (api/)
A cpp-httplib HTTP server exposes the following endpoints:
| Endpoint | Description |
|---|---|
GET /version | Agent version string |
GET /stats | Packet capture statistics |
GET /flows | Current flow table |
GET /anomalies | Detected traffic anomalies |
GET /devices | Discovered device inventory |
GET /devices/:ip | Per-device detail — ARP entries, IP history, alerts |
GET /topology | Network topology node/edge data |
GET /stream | SSE endpoint for real-time event push |
All endpoints support Bearer token authentication via FLINTNET_API_TOKEN.
InfluxDB pipeline (storage/)
Flow metrics, SNMP interface utilisation, and anomaly records are written to InfluxDB 1.8 for time-series storage. The pipeline uses a background thread and an MPSC ring buffer to decouple writes from the capture hot path.
| Thread name | Responsibility |
|---|---|
flintnet-cap | AF_PACKET packet capture (one per interface) |
flintnet-pipe | Flow processing and anomaly detection pipeline |
flintnet-stor | InfluxDB write pipeline |
flintnet-poll | SNMP polling and ARP walking |
flintnet-trap | SNMP trap listener |
flintnet-push | SSE event push to connected clients |
flintnet-api | HTTP server worker threads (cpp-httplib thread pool) |
topology-poll | LLDP/CDP topology polling |
flintnet-email | SMTP email alerter |
flintnet-alrt | Alert store event bus subscriber |
| Library | Purpose |
|---|---|
| libpcap / AF_PACKET | Packet capture |
| net-snmp | SNMP polling and trap reception |
| cpp-httplib | Embedded HTTP server |
| RapidJSON | JSON serialisation |
| libcurl | SMTP email delivery and HTTP client |
| influxdb-cxx | InfluxDB write client |
| plog | Structured logging |
ui/The Flutter web UI communicates with the agent via REST and a persistent SSE connection. It runs in Chrome or Edge and is served by nginx in the Docker deployment.
Login screen — connects to the agent at a configurable URL with an optional Bearer token. Credentials are saved to localStorage and restored on page load so the user is not required to log in again on refresh. A logout button in the nav sidebar clears the saved session.
Dashboard — real-time traffic statistics, active flow table, and detected anomalies. Updates live via the SSE connection.
Devices screen — a card grid of all discovered devices. Each card shows the device IP, SNMP reachability status, device type, sysDescr, and per-interface utilisation bars (colour-coded green/amber/red). Utilisation bars update in real time via SSE. Clicking a card navigates to the device detail screen.
Device detail screen — per-device drill-down showing device info, ARP entries with IP history, live interface utilisation, and recent security alerts.
Anomalies screen — list of flows where traffic has deviated significantly above the EWMA baseline.
Security screen — live feed of security events published to the SSE stream.
Topology screen — network graph rendered from LLDP/CDP neighbour data using the graphview package. Nodes are labelled with device IP addresses. Supports zoom and pan via InteractiveViewer. Nodes with active security or anomaly alerts are highlighted in red.
| Service | Responsibility |
|---|---|
ApiService | REST API client — all HTTP calls to the agent |
SseService | Persistent SSE connection with automatic reconnection |
ConfigService | Singleton holding base URL, token, and localStorage I/O |
TopologyService | Fetches and parses topology edge data |
| Package | Purpose |
|---|---|
http | HTTP client for REST API calls |
graphview | Network topology graph rendering |
fl_chart | Charts and data visualisation |
Flintnet is deployed via Docker Compose. Three services run on the host network:
| Service | Description | Port |
|---|---|---|
flintnet-agent | C++ monitoring agent | 3000 |
flintnet-ui | Flutter web UI served by nginx | 80 |
influxdb | InfluxDB 1.8 time-series database | 8086 |
network_mode: host is required for the agent to access raw network sockets. The agent container runs with NET_RAW, NET_ADMIN, and NET_BIND_SERVICE capabilities.
curl -fsSL https://flintnet.io/install.sh | bash
cd ~/flintnet
nano .env # set FLINTNET_CIDR at minimum
docker compose up -d --build
Open http://<your-host-ip> in Chrome or Edge.
All configuration is via environment variables in .env. See .env.example for the full reference.
| Variable | Required | Description |
|---|---|---|
FLINTNET_CIDR | Yes | Subnet to monitor, e.g. 192.168.1.0/24 |
FLINTNET_SNMP_COMMUNITY | Yes | SNMPv2c community string |
FLINTNET_API_TOKEN | No | Bearer token for REST API authentication |
FLINTNET_LOG_LEVEL | No | Log verbosity — debug, info, warning |
FLINTNET_SMTP_HOST | No | SMTP server for email alerting |
FLINTNET_ALERT_EMAIL | No | Recipient address for alert emails |
INFLUXDB_DB | No | InfluxDB database name (default: flintnet) |
See LICENSE for terms. Flintnet is a commercial self-hosted product — see Terms & Conditions for full usage terms.
docker pull flintnet/agent:latest