Stream module logging questions

Grzegorz Kulewski gk at leniwiec.biz
Tue Mar 6 08:18:23 UTC 2018


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


More information about the nginx mailing list