I am trying to add some fields to the logs coming from wingbeat 7.9 to Logstash.
I need to extract the value from either user.name or related.user and add a new 'username' field.
I was doing something like this but this just adds the text '%related.user' to the logs. Is this possible at all?
if [type] == "winlogbeat" and [user][name] {
mutate {
add_field => [ "username", "%[user][name]" ]
}
}
Thanks,
Camilo