I've configured a FileBeat service to send logs to Kibana via LogStash. FileBeat and LogStash are in different servers while Kibana is inside an AWS ElasticSearch domain. The logs are visible in the Kibana dashboard. In each record, there's a field called message which consists of 10 sub-fields (nested field). What I need to do is, extract values from those sub-fields and present them as separate fields.
I have tried both GROK and MUTATE to achieve this but no progress.
Let's consider one of the sub-field, named conName.
Using MUTATE : Tried putting field name and sub-field name in square brackets, like explained in one of previous answers. I got %{[message][conName]}
as the output.
mutate {
add_field => {
"custom_field1" => "%{[message][conName]}"
}
}
Using MUTATE with split: Following documentation, I tried using split to first split the message field into independent 10 fields, did not work either.
mutate {
split => { "message" => "," }
add_field => { "message1" => "%{message[0]}" }
}
Using GROK
grok {
match => { "message" => "%{STRING:conName}" }
}
At least tell me which one should I use: MUTATE or GROK?