HAProxy logstash re-refix for timestamp in case of SSL error
@@ -61,6 +61,12 @@ filter {
mutate {
add_field => { "[redir][backend][name]" => "ssl-error" }
}
+ # Set the timestamp from the log to @timestamp, example: 16/Sep/2018:07:08:21.783
+ date {
+ match => [ "[redir][timestamp]", "dd/MMM/yyyy:HH:mm:ss.SSS" ]
+ target => "@timestamp"
+ timezone => "Etc/UTC"
+ }
} else {
# now matching the real haproxy lines. We have several log line formats we need to match:
# - Lines without X-Forwarded-For identified with "xforwardedfor:-"
@@ -118,7 +124,7 @@ filter {
}
}
- # Set the timestamp from the log to @timestamp, example: 16/Sep/2018:07:08:21.783
+ # Set the timestamp from the log to @timestamp, example: 15/Apr/2018:19:22:31 +0000
date {
match => [ "[redir][timestamp]", "dd/MMM/yyyy:HH:mm:ss Z" ]
target => "@timestamp"
