Hi EveryBody,
I'm working with logstash grok to extract a string from a field.
Here is an example of the
"myfield":" stringToExtract-instance 2017-02-06 05:48:25 INFO XXXXXXXX"
I want to extract the stringToExtract from the field myfield.
I have given a try with
grok {
match => [
"myfield",
" <ValueOfNewField>[^-instance]"
]
]
For the custom field
filter {
mutate {
add_field => { "newField" => "ValueOfNewField" }
}
}
Well the first part is no working. But I pretty sure that the second will work if the first part works.
Any help for configuring the first part will be appreciated.
Thanks.