fix(inputs.net): Skip checks in containerized environments (#16580)

This commit is contained in:
Sven Rebhan 2025-03-05 16:22:35 +01:00 committed by GitHub
parent 26a692a240
commit ea2c361154
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,11 @@ func (n *Net) Init() error {
) )
} }
// So not use the interface list of the system if the HOST_PROC variable is
// set as the interfaces are determined by a syscall and therefore might
// differ especially in container environments.
n.skipChecks = os.Getenv("HOST_PROC") != ""
return nil return nil
} }