Skip to content

Commit

Permalink
[Auditbeat] Cherry-pick #11232 to 7.0: Process dataset: Only report p…
Browse files Browse the repository at this point in the history
…rocesses with executable (#11258)

Cherry-pick of PR #11232 to 7.0 branch. Original message: 

Excludes kernel processes on Linux. They don't provide a lot of value, the names are not unique, and they will not be able to use potential future features like process executable hashes.
  • Loading branch information
Christoph Wurm authored Mar 15, 2019
1 parent 03a9428 commit dc3b6da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ https://github.com/elastic/beats/compare/v7.0.0-beta1...master[Check the HEAD di

*Auditbeat*

- Process dataset: Only report processes with executable. {pull}11232[11232]

*Filebeat*

- Set `ecs: true` in user_agent processors when loading pipelines with Filebeat 7.0.x into Elasticsearch 6.7.x. {issue}10655[10655] {pull}10875[10875]
Expand Down
6 changes: 6 additions & 0 deletions x-pack/auditbeat/module/system/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"os"
"os/user"
"runtime"
"strconv"
"time"

Expand Down Expand Up @@ -422,6 +423,11 @@ func (ms *MetricSet) getProcesses() ([]*Process, error) {
}
}

// Exclude Linux kernel processes, they are not very interesting.
if runtime.GOOS == "linux" && userInfo.UID == "0" && process.Info.Exe == "" {
continue
}

processes = append(processes, process)
}

Expand Down

0 comments on commit dc3b6da

Please sign in to comment.