Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packetbeat/procs: don't log at ERROR for file not found #33854

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff]
- Add option to allow sniffing multiple interface devices. {issue}31905[31905] {pull}32933[32933]
- Bump Windows Npcap version to v1.71. {issue}33164[33164] {pull}33172[33172]
- Add fragmented IPv4 packet reassembly. {issue}33012[33012] {pull}33296[33296]
- Reduce logging level for ENOENT to WARN when mapping sockets to processes. {issue}33793[33793] {pull}[]

*Functionbeat*

Expand Down
6 changes: 5 additions & 1 deletion packetbeat/procs/procs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ func (proc *ProcessesWatcher) GetLocalPortToPIDMapping(transport applayer.Transp
for _, pid := range pids.List {
inodes, err := findSocketsOfPid("", pid)
if err != nil {
logp.Err("FindSocketsOfPid: %s", err)
if os.IsNotExist(err) {
logp.Info("FindSocketsOfPid: %s", err)
} else {
logp.Err("FindSocketsOfPid: %s", err)
}
continue
}

Expand Down