Skip to content

Commit

Permalink
Use User.Name if User.Username is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Wurm committed Jan 28, 2019
1 parent 22a1b79 commit 1c0d8f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x-pack/auditbeat/module/system/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ func processEvent(process *Process, eventType string, action eventAction) mb.Eve
}

if process.User != nil {
event.RootFields.Put("user.name", process.User.Username)
if process.User.Username != "" {
event.RootFields.Put("user.name", process.User.Username)
} else if process.User.Name != "" {
event.RootFields.Put("user.name", process.User.Name)
}
}

if process.Group != nil {
Expand Down

0 comments on commit 1c0d8f1

Please sign in to comment.