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", "\"", " " "message", "\"", " "
] ]
} }
mutate {
gsub => [
"message", "'", "^"
]
}
if [stack_trace] { if [stack_trace] {
mutate { mutate {
gsub => [ gsub => [
"stack_trace", "\n", "_" "stack_trace", "\n", "_"
] ]
} }
mutate {
gsub => [
"stack_trace", "'", "^"
]
}
mutate { mutate {
split => { "stack_trace" => "_" } split => { "stack_trace" => "_" }
add_field => { "stackFirst" => "%{[stack_trace][0]}" } add_field => { "stackFirst" => "%{[stack_trace][0]}" }