From 1ded5b89deef74a00cb2dc1fd92969327e995bbb Mon Sep 17 00:00:00 2001 From: Hunter Gregory <42728408+huntergregory@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:58:56 -0800 Subject: [PATCH] fix(netstat): curate stats for tcp connections Signed-off-by: Hunter Gregory <42728408+huntergregory@users.noreply.github.com> --- pkg/plugin/linuxutil/linuxutil_linux.go | 2 +- pkg/plugin/linuxutil/types_linux.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/plugin/linuxutil/linuxutil_linux.go b/pkg/plugin/linuxutil/linuxutil_linux.go index 4a1a3b5549..4b4a54628c 100644 --- a/pkg/plugin/linuxutil/linuxutil_linux.go +++ b/pkg/plugin/linuxutil/linuxutil_linux.go @@ -67,7 +67,7 @@ func (lu *linuxUtil) run(ctx context.Context) error { return nil case <-ticker.C: opts := &NetstatOpts{ - CuratedKeys: false, + CuratedKeys: true, AddZeroVal: false, ListenSock: false, PrevTCPSockStats: lu.prevTCPSockStats, diff --git a/pkg/plugin/linuxutil/types_linux.go b/pkg/plugin/linuxutil/types_linux.go index c0467360e4..27f7b40dc7 100644 --- a/pkg/plugin/linuxutil/types_linux.go +++ b/pkg/plugin/linuxutil/types_linux.go @@ -35,6 +35,9 @@ var netstatCuratedKeys = map[string]struct{}{ "DataCsumErr": {}, "AddAddrDrop": {}, "RmAddrDrop": {}, + "TCPTimeouts": {}, + "TCPLossProbes": {}, + "TCPLostRetransmit": {}, } type ConnectionStats struct {