GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Tail::Stat::Plugin::nginx(3) User Contributed Perl Documentation Tail::Stat::Plugin::nginx(3)

Tail::Stat::Plugin::nginx - Statistics collector for Nginx web-server

tstatd -o clf nginx httpd.access_log

Nginx has predefined (compiled in) log format named combined. This format defined as:

log_format combined '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"';

This format produces such lines:

1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 "http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1"

For collecting statistics about request timing, upstream delays and cache efficiency it's recommended to extend log format:

log_format extended '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" ' 'rt=$request_time ut="$upstream_response_time" ' 'cs=$upstream_cache_status';

Extended format creates log records like this:

1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 "http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1" rt=0.010 ut="2.001, 0.345" cs=MISS

"clf"
Simplify regular expression (don't accumulate information about client/upstream timings and cache status).

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_version_2_0"
Total number of served HTTP/2.0 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.

Cache statuses

NOTE: available unless "clf" option in use.

"cache_status_expired"
Total number of served request with cache status EXPIRED.
"cache_status_hit"
Total number of served request with cache status HIT.
"cache_status_miss"
Total number of served request with cache status MISS.
"cache_status_stale"
Total number of served request with cache status STALE.
"cache_status_updating"
Total number of served request with cache status UPDATING.

Upstream requests

NOTE: available unless "clf" option in use.

"upstream_request"
Total number of requests proxied to upstreams.
"upstream_next_count"
Total number of switching between upstreams.

HTTP traffic
"last_http_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.

Upstream requests

NOTE: available unless "clf" option in use.

"last_upstream_request"
Total number of proxied requests during last window.
"last_upstream_time"
Total amount of time elapsed to proxying requests during last window.

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

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.

2016-12-03 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.