unable to log upstream_bytes_sent

Chad Hansen chadhansen at google.com
Tue Apr 25 18:53:03 UTC 2017


I'm running nginx 1.11.9, and I get an error any time I try to use
bytes_sent, upstream_bytes_sent, or upstream_bytes_received. I've tried
logging directly in a log format, or using in a map:

<in http context>

map $request_method $chad_sent {
  default $upstream_bytes_sent;
}

map $request_method $chad_received {
  default $upstream_bytes_received;
}

This results in:

me at here:~/Downloads$ sudo service nginx restart
 * Restarting nginx nginx

nginx: [emerg] unknown "upstream_bytes_sent" variable
nginx: configuration file /etc/nginx/nginx.conf test failed

It's unclear to me if there's something wrong with my build, or if I have
to use a stream context, or some other issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170425/8a1aa820/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4851 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170425/8a1aa820/attachment.bin>


More information about the nginx mailing list