Re: Get rid of TCP "Connect from..." logs

2019-09-11 Thread Lukas Tribus
Hello Artur,


On Wed, Sep 11, 2019 at 1:22 PM Artur  wrote:
>
> Hello,
>
> My current 2.0.5 haproxy logs a lot of "useless" messages such as :
>
> Sep 11 13:10:08 server haproxy[28163]: Connect from 127.0.0.1:39951 to
> 127.0.0.1:6379 (r1_front/TCP)
>
> My configuration is something like (I removed lines not related to
> logging) :
>
> global
> log /dev/loglocal0
> log /dev/loglocal1 notice
> defaults
> log global
> option  dontlognull
> option dontlog-normal
> frontend r1_front
> bind 127.0.0.1:6379
> mode tcp
> option dontlog-normal
> option dontlognull
> default_backend r1_back
> backend r1_back
> mode tcp
> ...
>
> I don't want to remove all logs, however logging "normal" connections
> information is not needed.
> At the moment I was unable to disable those "Connect from" lines.

Looks like option dontlog-normal does cover this case.

I suggest you enable tcplog:
option tcplog

This way, error messages are a lot more useful and I'd expect that
this logging mode is covered by dontlog-normal.


Lukas



Re: Get rid of TCP "Connect from..." logs

2019-09-11 Thread Aleksandar Lazic
Hi.

Am 11.09.2019 um 13:22 schrieb Artur:
> Hello,
> 
> My current 2.0.5 haproxy logs a lot of "useless" messages such as :
> 
> Sep 11 13:10:08 server haproxy[28163]: Connect from 127.0.0.1:39951 to
> 127.0.0.1:6379 (r1_front/TCP)
> 
> My configuration is something like (I removed lines not related to
> logging) :
> 
> global
>     log /dev/log    local0
>     log /dev/log    local1 notice
> defaults
>     log global
>     option  dontlognull
>     option dontlog-normal
> frontend r1_front
>     bind 127.0.0.1:6379
>     mode tcp
>     option dontlog-normal
>     option dontlognull
>     default_backend r1_back
> backend r1_back
>     mode tcp
> ...
> 
> I don't want to remove all logs, however logging "normal" connections
> information is not needed.
> At the moment I was unable to disable those "Connect from" lines.
> 
> Any idea on what I'm doing wrong here ?
> 
> By the way, any pointers to articles on how to well manage logging with
> haproxy are welcome. I always had a problem to correctly understand
> logging in haproxy.

How about this post?
https://www.haproxy.com/blog/introduction-to-haproxy-logging/

> Thanks a lot for your help.

Regards
Aleks



Get rid of TCP "Connect from..." logs

2019-09-11 Thread Artur
Hello,

My current 2.0.5 haproxy logs a lot of "useless" messages such as :

Sep 11 13:10:08 server haproxy[28163]: Connect from 127.0.0.1:39951 to
127.0.0.1:6379 (r1_front/TCP)

My configuration is something like (I removed lines not related to
logging) :

global
    log /dev/log    local0
    log /dev/log    local1 notice
defaults
    log global
    option  dontlognull
    option dontlog-normal
frontend r1_front
    bind 127.0.0.1:6379
    mode tcp
    option dontlog-normal
    option dontlognull
    default_backend r1_back
backend r1_back
    mode tcp
...

I don't want to remove all logs, however logging "normal" connections
information is not needed.
At the moment I was unable to disable those "Connect from" lines.

Any idea on what I'm doing wrong here ?

By the way, any pointers to articles on how to well manage logging with
haproxy are welcome. I always had a problem to correctly understand
logging in haproxy.

Thanks a lot for your help.

-- 
Best regards,
Artur