Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (42 sloc) 994 Bytes
filter {
#Add tag 'stacktrace' if starts with tab + 'at'
if [message] =~ "\tat" {
grok {
match => ["message", "^(\tat)"]
add_tag => ["stacktrace"]
}
}
#Grokking Spring Boot's Sleuth and default log format
grok {
patterns_dir => ["/etc/logstash/conf.d/patterns"]
named_captures_only => true
match => {
"message" => [
"%{SB_LAYOUT}: %{METRIC_MSG:message}",
"%{SB_LAYOUT}: %{GREEDYDATA:message}"
]
}
overwrite => [ "message" ]
}
#Replace autogenerated @timestamp with timestamp from grok
date {
match => [ "timestamp" , "yyyy-MM-dd HH:mm:ss.SSS" ]
timezone => [ "Europe/Rome" ]
}
mutate {
convert => {
"export" => "boolean"
"elapsed_in_ms" => "integer"
"status" => "integer"
}
}
}
output {
elasticsearch {
hosts => ["localhost"]
index => "plain-%{service_name}-%{+yyyy.MM.dd}"
}
stdout {
codec => rubydebug
}
}