Skip to content

Commit

Permalink
doc: Link to the apache log config docs and fix a bad comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Jan 7, 2024
1 parent 6c316ba commit 2700558
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/apache_common.mtail
@@ -1,5 +1,6 @@
# Parser for the common apache log format as follow.
# LogFormat "%h %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-agent}i\"
# https://httpd.apache.org/docs/2.4/mod/mod_log_config.html
counter apache_http_requests_total by request_method, http_version, status_code
counter apache_http_bytes_total by request_method, http_version, status_code
gauge apache_http_response_time by remote_host, request_method, request_uri, status_code, user_agent
Expand All @@ -9,7 +10,7 @@ gauge apache_http_response_size by remote_host, request_method, request_uri, sta
/(?P<remote_host>[0-9A-Za-z\.:-]+) / + # %h
/(?P<remote_logname>[0-9A-Za-z-]+) / + # %l
/(?P<remote_username>[0-9A-Za-z-]+) / + # %u
/\[(?P<timestamp>\d{2}\/\w{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|-)\d{4})\] / + # %u
/\[(?P<timestamp>\d{2}\/\w{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|-)\d{4})\] / + # %t
/"(?P<request_method>[A-Z]+) (?P<request_uri>\S+) (?P<http_version>HTTP\/[0-9\.]+)" / + # \"%r\"
/(?P<status_code>\d{3}) / + # %>s
/((?P<response_size>\d+)|-) / + # %b
Expand Down

0 comments on commit 2700558

Please sign in to comment.