fix logstash alert ' invalid

main
ycz008 2024-03-07 23:08:53 +08:00
parent 1403ec1ca0
commit da8181fc39
1 changed files with 10 additions and 0 deletions

View File

@ -72,12 +72,22 @@ data:
"message", "\"", " "
]
}
mutate {
gsub => [
"message", "'", "^"
]
}
if [stack_trace] {
mutate {
gsub => [
"stack_trace", "\n", "_"
]
}
mutate {
gsub => [
"stack_trace", "'", "^"
]
}
mutate {
split => { "stack_trace" => "_" }
add_field => { "stackFirst" => "%{[stack_trace][0]}" }