Re: Stream module logging questions
W dniu 06.03.2018 o 09:24, Maxim Konovalov pisze: > Hi Grzegorz, > > [..] 3. I think that $tcpinfo_* aren't supported in stream. Is there any reason for this? >>> >>> There's a number of http module features still missing in >>> stream. This is one of them. >> >> I can offer virtual (and real if in Poland) beer for adding this. >> :) >> > Just wonder, how do you use this info in http? Is it useful for you? Hello, We are using it mainly as an aid in debugging since we have sometimes clients with *very* poor internet connection (for example from Africa). Also we are considering to use it to detect extremely badly GeoDNS routed clients and maybe as a test platform for clients to aid our further GeoDNS decissions. I think this feature is not a silver bullet that solves all the problems but it can be usefull in some cases and should be easy to add to stream in nginx and to any other program. -- Grzegorz Kulewski ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Stream module logging questions
Hi Grzegorz, [..] >>> 3. I think that $tcpinfo_* aren't supported in stream. Is >>> there any reason for this? >> >> There's a number of http module features still missing in >> stream. This is one of them. > > I can offer virtual (and real if in Poland) beer for adding this. > :) > Just wonder, how do you use this info in http? Is it useful for you? -- Maxim Konovalov ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Stream module logging questions
Hello, Thank you for your answer. W dniu 01.03.2018 o 12:52, Roman Arutyunyan pisze: > Hello, > > On Thu, Mar 01, 2018 at 04:06:09AM +0100, Grzegorz Kulewski wrote: >> Hello, >> >> 1. How can I log the IP and (especially) the port used by nginx (proxy) to >> connect to upstream when stream module is used? >> 2. Can I somehow get a log entry also/instead at stream connection setup >> time, not only after it ends? > > Stream module logs this in error.log with 'info' log level as soon as this > information is available: > > 2018/03/01 14:37:27 [info] 38462#0: *1 client 127.0.0.1:61020 connected to > 0.0.0.0:9000 > 2018/03/01 14:37:27 [info] 38462#0: *1 proxy 127.0.0.1:61021 connected to > 127.0.0.1:8001 Yes, I know about it. It would be really useful to have it in access log (== in some variable) too. Do you think you could add that? Also it would be really usefull to have access_log_connect and access_log_upstream_connect directives in addition to access_log that enable logging things on connect and upstream connect, not only on disconnect. >> 3. I think that $tcpinfo_* aren't supported in stream. Is there any reason >> for this? > > There's a number of http module features still missing in stream. > This is one of them. I can offer virtual (and real if in Poland) beer for adding this. :) -- Grzegorz Kulewski ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Stream module logging questions
Hello, On Thu, Mar 01, 2018 at 04:06:09AM +0100, Grzegorz Kulewski wrote: > Hello, > > 1. How can I log the IP and (especially) the port used by nginx (proxy) to > connect to upstream when stream module is used? > 2. Can I somehow get a log entry also/instead at stream connection setup > time, not only after it ends? Stream module logs this in error.log with 'info' log level as soon as this information is available: 2018/03/01 14:37:27 [info] 38462#0: *1 client 127.0.0.1:61020 connected to 0.0.0.0:9000 2018/03/01 14:37:27 [info] 38462#0: *1 proxy 127.0.0.1:61021 connected to 127.0.0.1:8001 > 3. I think that $tcpinfo_* aren't supported in stream. Is there any reason > for this? There's a number of http module features still missing in stream. This is one of them. -- Roman Arutyunyan ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx