From da8181fc397f07831d7008e5d3f38e5b138dd9b5 Mon Sep 17 00:00:00 2001 From: ycz008 Date: Thu, 7 Mar 2024 23:08:53 +0800 Subject: [PATCH] fix logstash alert ' invalid --- dev-upgrade/elastic/logstash-alert.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dev-upgrade/elastic/logstash-alert.yaml b/dev-upgrade/elastic/logstash-alert.yaml index 7600640..837036d 100644 --- a/dev-upgrade/elastic/logstash-alert.yaml +++ b/dev-upgrade/elastic/logstash-alert.yaml @@ -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]}" }