Skip to content

Types not working in V2.5.0 #66

@hari9973

Description

@hari9973

In previous version(ie 2.4.0) i used the below config:-

<parse>
   @type grok
   types log_timestamp:time:%d/%b/%Y:%H:%M:%S
   grok_pattern %{IPORHOST:remote_addr} - %{HTTPDUSER:remote_user} \[%{HTTPDATE:log_timestamp}\] "(?:%{WORD:http_verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:http_version})?|%{DATA:rawrequest})" %{NUMBER:http_response_code} %{NUMBER:bytes:integer}( %{NUMBER:reqtime}| -)?( %{NUMBER:upstime}| -)?( %{HOSTPORT:upstream_addr} | - )?(?<pipe>[pP]|.)? %{QS:http_referer} %{QS:http_user_agent}
 </parse>

And got the output as below:-

{"remote_addr":"103.21.16.20","remote_user":"-","log_timestamp":1549156652000,"http_verb":"POST","request":"/game","http_version":"1.1","http_response_code":"200","bytes":"101","http_referer":"\"-\"","http_user_agent":"\"Python-urllib/2.7\"","log_file_path":"/home/access.log"}

But this does not seem to be working in the current version.can you provide me a solution

Thanks

Note:- I tried the following in new version and i am getting nil
\[%{HTTPDATE:log_timestamp:time:%d/%b/%Y:%H:%M:%S %z}\]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions