AWStats currently supports these gzip/deflate field formats:
%gzipin mod_gzip compression input bytes: In:XXX
%gzipout mod_gzip compression output bytes & ratio: Out:YYY:ZZpct.
%gzipratio mod_gzip compression ratio: ZZpct.
%deflateratio mod_deflate compression ratio with format: (ZZ)
However, nginx only provides:
$gzip_ratio – achieved compression ratio, computed as the ratio between the original and compressed response sizes.
For instance, a log entry like
my.vhost ip.address - [07/Feb/2014:20:51:40 +0100] "GET /my-url HTTP/1.1" 200 3021 "-" "Mozilla/5.0 (WhatsMyIP.org HTTP_Compression_Test) whatsmyip.org/ua" 2.96
Uncompressed Page Size: 8.7 KB
Compressed Page Size: 2.9 KB
So the gzip_ratio = uncompressed/compressed = 8.7/2.9 = 2.96
Please provide this ratio as an AWStats field so that nginx gzip compression can be analyzed correctly.