update logstash

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

View File

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