hi, I'm using Logstash 6.8.0 for parsing logs, It works fine. I'm splitting "path" field using current pipeline:
if [path] and !([path] == "/") {
mutate {
copy => {"path" => "path_split"}
}
mutate {
split => {"path_split" => "/"}
add_field => { "url" => "%{path_split[1]}" }
}
}
But when I tryed it in Logstash 7.2.0, I'm getting an error:
[2019-07-31T09:29:37,717][WARN ][logstash.filters.mutate ] Exception caught while applying mutate filter {:exception=>"Invalid FieldReference: `path_split[1]`"}
[2019-07-31T09:29:37,717][WARN ][logstash.filters.mutate ] Exception caught while applying mutate filter {:exception=>"Invalid FieldReference: `path_split[1]`"}
Could you please help me to solve the issue, thanks.