Skip to content
Permalink
Browse files

Use User.Name if User.Username is empty.

  • Loading branch information
cwurm committed Jan 25, 2019
1 parent f92d87e commit 0397c47221575f375febb0bdfc6a7ba19b29868f
Showing with 5 additions and 1 deletion.
  1. +5 −1 x-pack/auditbeat/module/system/process/process.go
@@ -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 {

0 comments on commit 0397c47

Please sign in to comment.
You can’t perform that action at this time.