diff --git a/site-modules/profile/templates/logstash/filter.conf.erb b/site-modules/profile/templates/logstash/filter.conf.erb index e1c0e9e5..299e586f 100644 --- a/site-modules/profile/templates/logstash/filter.conf.erb +++ b/site-modules/profile/templates/logstash/filter.conf.erb @@ -1,27 +1,31 @@ filter { if [fields][apache_log_type] == "access_log" { grok { - match => { "message" => "%{COMBINEDAPACHELOG}" } + match => { "message" => "%{COMBINEDAPACHELOG}( %{NUMBER:duration_ms})?" } } date { match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ] } mutate { add_field => { "[@metadata][target_index]" => "apache_logs-%{+YYYY.MM.dd}" } + convert => { + "response" => "integer" + "duration_ms" => "integer" + } } } else if "swh-worker@" in [systemd_unit] { mutate { add_field => { "[@metadata][target_index]" => "swh_workers-%{+YYYY.MM.dd}" } } } else { mutate { add_field => { "[@metadata][target_index]" => "systemlogs-%{+YYYY.MM.dd}" } } } }