How jacobryu/sentinel-flow-rs works
SentinelFlow-rs is a host-level network security sensor: it captures Ethernet traffic, parses packets, aggregates bidirectional flows, and exports flow records. Configuration and Prometheus metrics support the sensor runtime. The README also describes ClickHouse/Grafana, detection, and Kubernetes enrichment; the excerpts do not show those features wired into the running sensor, so those links are marked as documented or unverified rather than asserted as runtime calls.
Main entry points: lib.rs Frame parser · flow.rs Flow processor · main.rs Sensor runtime · export.rs Flow exporter
Components 21
Sensor runtime
- Sensor runtime
crates/sentinel-sensor/src/main.rs - Sensor config
crates/sentinel-sensor/src/config.rs - Packet capture
crates/sentinel-sensor/src/capture.rs - Sensor metrics
crates/sentinel-sensor/src/metrics.rs
Packet parsing
- Frame parser
crates/sentinel-parser/src/lib.rs - Ethernet headers
crates/sentinel-parser/src/ethernet.rs - IP headers
crates/sentinel-parser/src/ip.rs - Parsed packet
crates/sentinel-parser/src/packet.rs - TCP headers
crates/sentinel-parser/src/tcp.rs - UDP headers
crates/sentinel-parser/src/udp.rs
Flow processing
- Flow processor
crates/sentinel-sensor/src/flow.rs - Flow table
crates/sentinel-flow/src/table.rs - Flow key
crates/sentinel-flow/src/key.rs - Flow entry
crates/sentinel-flow/src/entry.rs - Flow exporter
crates/sentinel-flow/src/export.rs
Security and observability
- ClickHouse
- Grafana
- Detection engine
crates/sentinel-detection/src/engine.rs - Detection rules
crates/sentinel-detection/src/rules.rs - Kubernetes enrichment
crates/sentinel-enrichment/src/kubernetes.rs
Other components
- Host traffic
Connections 20
- Host traffic → Packet capture: supplies frames
crates/sentinel-sensor/src/capture.rs - Sensor runtime → Sensor config: loads config
crates/sentinel-sensor/src/main.rs - Sensor runtime → Packet capture: starts capture
crates/sentinel-sensor/src/main.rs - Packet capture → Frame parser: parses frames
crates/sentinel-sensor/src/capture.rs - Frame parser → Ethernet headers: parses link header
crates/sentinel-parser/src/lib.rs - Frame parser → IP headers: parses IP header
crates/sentinel-parser/src/lib.rs - Frame parser → TCP headers: parses TCP header
crates/sentinel-parser/src/lib.rs - Frame parser → UDP headers: parses UDP header
crates/sentinel-parser/src/lib.rs - Frame parser → Parsed packet: builds packet
crates/sentinel-parser/src/lib.rs - Sensor runtime → Flow processor: processes packets
crates/sentinel-sensor/src/main.rs - Sensor runtime → Sensor metrics: updates counters
crates/sentinel-sensor/src/main.rs - Flow processor → Flow table: updates and sweeps
crates/sentinel-sensor/src/flow.rs - Flow processor → Flow key: creates flow keys
crates/sentinel-sensor/src/flow.rs - Flow table → Flow entry: updates entries
crates/sentinel-flow/src/table.rs - Flow processor → Flow exporter: exports flows
crates/sentinel-sensor/src/flow.rs - Flow processor → Sensor metrics: records flow metrics
crates/sentinel-sensor/src/flow.rs - Flow exporter → ClickHouse: sends flow batches
README.md - ClickHouse → Grafana: feeds dashboards
README.md - Flow exporter → Detection engine: provides flow telemetry
README.md - Detection engine → Detection rules: checks rules
crates/sentinel-detection/src/engine.rs