feat(traffic): each container's network rate, and each NFS mount's bytes, so a host's traffic has a sender (#6115)
Docker02's outbound traffic tops out the internet connection and Steward couldn't say who sends it: a container's counters were kept only as a running total, and NFS traffic belongs to no container. - Docker ingest turns each running container's cumulative network counters into net_rx_bps / net_tx_bps on "<host>/<container>" (net_rates), counting from the stored row so a restart of Steward loses nothing; a container new, recreated or restarted has no rate until its next snapshot. - Agent 1.25.0 reads the bytes sent and received per NFS mount from mountstats (already parsed for the delays) as tx_bps / rx_bps; Steward stores them as nfs_tx_bps / nfs_rx_bps on "<host>:<mount>". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -292,7 +292,8 @@ def _expand_sample_to_metrics(
|
||||
row("mounts_stalled", host_name, stalled)
|
||||
|
||||
# NFS delay per mount (agent ≥ 1.22.0, #5996): what its requests took
|
||||
# since the last sample. The host's slowest mount is its own metric, for
|
||||
# since the last sample, and (agent ≥ 1.25.0, #6115) the bytes a second
|
||||
# it sent and received. The host's slowest mount is its own metric, for
|
||||
# a rule; recorded only when some mount finished a request, since a mount
|
||||
# with none, idle or stuck, has no delay to give (mounts_stalled covers
|
||||
# stuck).
|
||||
@@ -302,7 +303,8 @@ def _expand_sample_to_metrics(
|
||||
for key, metric in (("ops_per_sec", "nfs_ops_per_sec"), ("rtt_ms", "nfs_rtt_ms"),
|
||||
("exe_ms", "nfs_exe_ms"), ("read_ms", "nfs_read_ms"),
|
||||
("write_ms", "nfs_write_ms"), ("retrans", "nfs_retrans"),
|
||||
("timeouts", "nfs_timeouts")):
|
||||
("timeouts", "nfs_timeouts"), ("tx_bps", "nfs_tx_bps"),
|
||||
("rx_bps", "nfs_rx_bps")):
|
||||
if isinstance(nfs.get(key), (int, float)):
|
||||
row(metric, mount_res, nfs[key])
|
||||
if isinstance(nfs.get("exe_ms"), (int, float)):
|
||||
|
||||
Reference in New Issue
Block a user