-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
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
Labels
No labels