Work in progress for telemetry collection. Currently supports:
- IPFIX and NetFlow v9
- UDP Notif
- YANG-Push
- BMP
With publisher towards Kafka and HTTP endpoints.
Pre-built RPM packages are available on the GitHub Releases page.
- Download the latest RPM for your architecture (e.g.,
netcalyx-collector-X.Y.Z-1.el8.x86_64.rpm). - Install using
dnforrpm:The RPM installs the binary tosudo dnf install ./netcalyx-collector-*.rpm/usr/bin/netcalyx-collectorand sets the necessary capabilities (cap_net_raw+ep).
Pre-built DEB packages are available on the GitHub Releases page.
- Download the latest DEB for your architecture (e.g.,
netcalyx-collector-X.Y.Z-1_amd64.deb). - Install using
apt:The DEB installs the binary tosudo apt install ./netcalyx-collector-*.deb/usr/bin/netcalyx-collector. - If you need raw socket access without running as root, set capabilities manually:
sudo setcap cap_net_raw+ep /usr/bin/netcalyx-collector getcap /usr/bin/netcalyx-collector
To build from source, you need a Rust toolchain installed. We recommend using rustup.
- Clone the repository:
git clone https://github.com/network-analytics/NetCalyx.git cd NetCalyx - Run using cargo:
Note: You might need to install development libraries such as
cargo run -p netcalyx-collector --release -- crates/collector/config.yaml
libcurl-devel(orlibcurl4-openssl-devon Debian/Ubuntu) depending on your OS.
Run the collector with a specific config file:
netcalyx-collector /path/to/config.yaml
# Or if running from source:
cargo run -p netcalyx-collector -- /path/to/config.yamlSee example configuration files in collector crate root.
Key configuration sections:
logging: Log level configurationruntime: Tokio runtime settings (thread count)telemetry: OpenTelemetry exporter settingsflow: IPFIX/NetFlow v9 collection and publishingudp_notif: UDP Notification collection and publishing
The collector uses tracing with EnvFilter for flexible log level control.
Set the default log level in your config.yaml:
logging:
level: "info" # Valid: trace, debug, info, warn, errorOverride the log level at runtime using the RUST_LOG environment variable:
# Set global log level
RUST_LOG=debug cargo run -p netcalyx-collector -- config.yaml
# Filter specific modules
RUST_LOG=netcalyx_collector=trace,tokio=info cargo run -p netcalyx-collector -- config.yaml
# Complex filtering (enable trace for flow, debug for UDP notif)
RUST_LOG="warn,netcalyx_collector::flow=trace,netcalyx_collector::yang_push=debug" \
cargo run -p netcalyx-collector -- config.yamlThe EnvFilter supports powerful filtering directives:
debug- Set global level to debugmy_crate=trace- Enable trace logs for specific cratemy_crate::module=info- Enable info logs for specific module[span_name]=debug- Enable debug logs within specific span[{field_name}]=trace- Enable trace logs for events/spans with specific fieldwarn,tokio::net=debug- Global warn, but debug for tokio::net
RUST_LOGenvironment variable (highest priority)- Config file
logging.level
Note: Invalid log levels or EnvFilters file will cause the collector to exit immediately with a clear error message.
The collector exports OpenTelemetry metrics via OTLP/gRPC:
telemetry:
id: "collector-01"
host: "localhost"
port: 4317
exporter_timeout: "10s"
reader_interval: "30s"Metrics include:
- Message processing rates
- Buffer sizes and backpressure
- Error counts
- Publisher health
The collector handles Ctrl+C (SIGINT) gracefully:
- Stops accepting new connections
- Drains in-flight messages from buffers
- Shuts down publishers (1s timeout each)
- Exits cleanly
The collector uses jemalloc for better memory efficiency on Linux (via tikv-jemallocator).
On startup, the collector logs:
- Git commit hash, branch, and tag
- Build timestamp
- Rust version and toolchain
- Operating system
This is powered by the shadow-rs crate.