unable to log upstream_bytes_sent

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

unable to log upstream_bytes_sent

nginx mailing list
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@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.

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: unable to log upstream_bytes_sent

nginx mailing list
Bumping; does anyone have experience using upstream_bytes_sent or upstream_byes_received?

On Tue, Apr 25, 2017 at 2:53 PM Chad Hansen <[hidden email]> wrote:
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@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.
--
Chad Hansen 
Senior Software Engineer 
google.com/jigsaw

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: unable to log upstream_bytes_sent

Igal @ Lucee.org
Chad,

On 5/1/2017 1:05 PM, Chad Hansen via nginx wrote:
Bumping; does anyone have experience using upstream_bytes_sent or upstream_byes_received?

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.

I have never tried to use these variables before, but I plugged them into my log_format directive now to test, and I can confirm that I get the same error on the Windows standard build of nginx 1.11.12, so I don't think that it's your specific build:

nginx: [emerg] unknown "upstream_bytes_sent" variable


Igal Sapir

Lucee Core Developer
Lucee.org


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: unable to log upstream_bytes_sent

rnburn