This is an on-host agent that passively collects performance statistics related to various communication protocols of interest, beginning with TCP. The statistics can be published in an OpenTelemetry format to an ingestion endpoint.
This application runs on Linux kernel version 5.8 and newer.
Tip
Instructions are available to deploy across a fleet of EC2 instances or EKS clusters and integrate with Amazon CloudWatch Network Flow Monitor.
Note
Before proceeding, make sure you have a C compiler and Rust development tools available on your system.
Build the application using the command:
cargo build --release
Note
Before starting the application, make sure you've created a cgroup. This
usually requires root priveleges or the CAP_SYS_ADMIN
capability.
mkdir /mnt/cgroup-nfm
mount -t cgroup2 none /mnt/cgroup-nfm
To run the application with statistics printed to stdout, use the following
command. Run this as root or with the CAP_BPF
capability.
target/release/network-flow-monitor-agent --cgroup /mnt/cgroup-nfm --publish-reports off --log-reports on
To see the available command-line options, run:
target/release/network-flow-monitor-agent --help
This project is licensed under the Apache 2.0 License.