Skip to content

Commit

Permalink
Merge pull request #793 from google/example-fix
Browse files Browse the repository at this point in the history
Link to the apache log config docs and fix a bad comment.
  • Loading branch information
jaqx0r committed Jan 7, 2024
2 parents 6c316ba + 7651ebf commit e888bb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ alerting tool, like [Prometheus](http://prometheus.io).
> you bring them down to the monitoring system?
[It deals with the instrumentation so the engineers don't have
to!](http://www.imdb.com/title/tt0151804/quotes/qt0386890) It has the
to!](http://www.imdb.com/title/tt0151804/quotes/?item=qt0386890) It has the
extraction skills! It is good at dealing with log files!!

## Read More
Expand Down
2 changes: 1 addition & 1 deletion docs/Deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ file { mtail_programme:
}
```

Alternatively, if you're using `scp` or some similiar method to copy the programme files without a receiver, then either follow it with a `ssh $host 'killall -HUP mtail'` or use a tool like [`inotifywait`](https://linux.die.net/man/1/inotifywait) in a side process next to mtail to watch for changes and send the reload signal.
Alternatively, if you're using `scp` or some similar method to copy the programme files without a receiver, then either follow it with a `ssh $host 'killall -HUP mtail'` or use a tool like [`inotifywait`](https://linux.die.net/man/1/inotifywait) in a side process next to mtail to watch for changes and send the reload signal.

```shell
inotifywait -m /etc/mtail/progs | while read event; do killall -HUP mtail; done
Expand Down
3 changes: 2 additions & 1 deletion examples/apache_common.mtail
Original file line number Diff line number Diff line change
@@ -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 e888bb5

Please sign in to comment.