update logstash

main
ycz008 2023-09-27 15:28:22 +08:00
parent fa0231ccbd
commit a884fd5752
1 changed files with 3 additions and 2 deletions

View File

@ -16,8 +16,9 @@ data:
source => "message"
}
}
grok {
match => { "log.file.path" => "(?:/[^/]+){2}/(?<env>[^/]+)" }
mutate {
split => { "[log][file][path]" => "/" }
add_field => { "env" => "%{[log][file][path][2]}" }
}
}