Rank destinations
--protocol tcp narrows it to one transport. The PROCESSES column shows how concentrated each destination is: one process is easy to explain, many processes means shared infrastructure.
Merge flows by a key
--group-by answers “by whom”, “to where”, “on which port” and “over which protocol” without changing the underlying records. --direction inbound|outbound|both chooses which side ranks the groups.
Separate content from application traffic
top files ranks what you actually serve or upload. transfers also lists FILE unknown rows: bytes sent with no file behind them, such as generated responses, proxied traffic or database results. If cost is driven by unknown rows, the lever is in the application, not in storage.
Track it in Prometheus
The counters are cumulative, sorate and increase answer cost questions over any window:
No metric carries an address or a port, by design: those labels would grow without bound. For per-destination accounting, aggregate the
file_transfer log records in your collector, where the address is an attribute.Split by protocol and direction
Capacity planning
- Sustained rate.
FiletraceEgressSpikein the recipes alerts above a chosen threshold; set it from your link capacity, not a round number. - Peak versus average.
max_over_time(sum(rate(filetrace_network_io_bytes_total{network_io_direction="transmit"}[5m]))[1h:1m])shows the peak the link must absorb. - Files sent, not bytes.
rate(filetrace_transfers_started_total[5m])is operation rate, which matters when the bottleneck is connections rather than bandwidth. - Inbound. The same counters with
network_io_direction="receive"show what the host pulls in.
Where the answer can mislead
- Bytes are counted at the local socket, before the network. They include protocol overhead the kernel adds later and exclude retransmissions, so they are close to, but not the same as, bytes billed by a provider.
- Loopback traffic is counted. An agent, a proxy or a service talking to itself over
127.0.0.1adds to the totals.--remote 127.0.0.0/8isolates it. - A file can be sent more than once, so
file.senttotals are not storage totals. - The agent’s own traffic to a collector counts too; exclude it with
[filters] exclude_processes = ["filetrace-agent"].
Related pages
filetrace flows— grouping and direction.filetrace top— the four subjects.- Prometheus — every metric and PromQL example.
- Observability recipes — dashboards and alerts.