Merge "Improve grok pattern matching for apache logs"

This commit is contained in:
Zuul 2023-10-30 15:09:30 +00:00 committed by Gerrit Code Review
commit 8e302cc47d
2 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,7 @@
key_name Payload
<parse>
@type grok
grok_pattern \[%{HTTPDATE:Timestamp}\] "(?:%{WORD:http_method} %{NOTSPACE:http_url}(?: HTTP/%{NUMBER:http_version})?|%{DATA:rawrequest})" %{NUMBER:http_status} (?:\d+|-)
grok_pattern \[%{HTTPDATE:Timestamp}\] "(?:%{WORD:http_method} %{NOTSPACE:http_url}(?: HTTP/%{NUMBER:http_version})?|%{DATA:rawrequest})" %{NUMBER:http_status} (?:%{NUMBER:http_bytes}|-) (?:%{NUMBER:http_response_time_us}|-) "%{DATA:referrer}" "%{DATA:agent}"
time_key Timestamp
time_format %d/%b/%Y:%H:%M:%S %z
keep_time_key true

View File

@ -0,0 +1,5 @@
---
features:
- |
Updates apache grok pattern to match the size of response in bytes,
time taken to serve the request and user agent.