How to convert the apache response time in Logstash?

I was able to parse the apache log with the response time using the below grok pattern:

filter {
            grok {
                match => [
                    "message" , "%{COMBINEDAPACHELOG}+%{GREEDYDATA:extra_fields} %{NUMBER:rt_seconds}/%{NUMBER:rt_microseconds}"
                ]
            }
            if ("&" in [request]) {
                grok {
                    match => ["request", "%{DATA:script_name}\?%{GREEDYDATA:script_kv}"]
                }
                kv {
                    source => "script_kv"
                    field_split => "&"
                    value_split => "="
                    remove_char_key => "_"
                    prefix => "query_string_"
                }
                mutate {
                    remove_field => [ "request" ]
                    remove_field => [ "script_kv" ]
                }
         }
       mutate {
                convert => ["response", "integer"]
                convert => ["bytes", "integer"]
                convert => ["rt_seconds", "integer"]
                convert => ["rt_microseconds", "integer"]
            }
}

When I see the type of the rt_*, it still shows as string ? But for response and bytes it shows as a NUMBER. How to fix it ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.