nginxinc/nginx-amplify-doc

Better docs for extended log format

ingria opened this issue · 2 comments

Some metrics require the additional variables to be added into the log format, but it is unclear where to put it.

For example, description for nginx.http.gzip.ratio says:

Achieved compression ratio, calculated as the ratio between the original and compressed response sizes.
Source: access.log (requires custom log format)
Variable: $gzip_ratio

But the docs for log format doesn't say anything about this variable and doesn't provide an example.

I m also looking for $gzip_ratio in the log format, and nothing

For others who may be looking for similar information -- the nginx.http.gzip.ratio variable $gzip_ratio can be used in the access.log log format in the same manner shown in the example in the NGINX Amplify Metrics and Metadata docs: NGINX Metrics - Additional NGINX Metrics.

The example in the NGINX admin guide that demonstrates how to configure logging includes the gzip_ratio variable: Setting Up the Access Log