The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tail::Stat::Plugin::apache - Statistics collector for Apache web-server

SYNOPSIS

tstatd -o clf apache httpd.access_log

LOG FORMATS

Apache has predefined log format named combined. This format defined as:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

This format produces such lines:

1.2.3.4 - - [03/Feb/2010:00:01:03 +0300] "GET / HTTP/1.0" 200 89422 "http://www.rambler.ru/" "Opera/9.80"

You can extend this formats with '%T' characters for logging time taken to serve the request:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" rt=%T" timed

Extended format creates log records like this:

1.2.3.4 - - [03/Feb/2010:00:01:03 +0300] "GET / HTTP/1.0" 200 89422 "http://www.rambler.ru/" "Opera/9.80" rt=2.929

OPTIONS

clf

Simplify regular expression (don't accumulate information about client timing).

STATISTICS

Overall statistics

HTTP traffic

http_request

Total number of served requests.

http_byte

Total number of sent bytes.

malformed_request

Total number of malformed requests.

HTTP methods

http_method_head

Total number of served HEAD requests.

http_method_get

Total number of served GET requests.

http_method_inc

Total number of served subrequests.

http_method_post

Total number of served POST requests.

http_method_other

Total number of served another types of requests.

HTTP versions

http_version_0_9

Total number of served HTTP/0.9 requests.

http_version_1_0

Total number of served HTTP/1.0 requests.

http_version_1_1

Total number of served HTTP/1.1 requests.

HTTP statuses

http_status_xxx

Total number of served requests with status of xxx.

http_status_1xx

Total number of served requests with status of 100-199.

http_status_2xx

Total number of served requests with status of 200-299.

http_status_3xx

Total number of served requests with status of 300-399.

http_status_4xx

Total number of served requests with status of 400-499.

http_status_5xx

Total number of served requests with status of 500-599.

Last statistics

HTTP traffic

last_request

Total number of served requests during last window.

last_http_byte

Total number of sent bytes during last window.

last_request_time

Total amount of time elapsed to serve requests during last window NOTE: available unless clf option in use.

AUTHOR

Oleg A. Mamontov, <oleg@mamontov.net>

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.