Re: TCP log format question

From: Willy Tarreau <w#1wt.eu>
Date: Thu, 27 Aug 2009 06:39:51 +0200


Hello,

On Wed, Aug 26, 2009 at 06:24:16PM +0400, Dmitry Sivachenko wrote:
> Hello!
>
> I am running haproxy-1.4-dev2 with the following
> configuration (excerpt):
>
> global
> log /var/run/log local0
> user www
> group www
> daemon
> defaults
> log global
> mode tcp
> balance roundrobin
> maxconn 2000
> option abortonclose
> option allbackups
> option httplog
> option dontlog-normal
> option dontlognull
> option redispatch
> option tcplog

I'm seeing that you have both "tcplog" and "httplog". Since they both add a set of flags, the union of both is enabled which means httplog to me. I should add a check for this so that tcplog disables httplog.

> In my log file I see the following lines:
> Aug 26 18:19:50 balancer0-00 haproxy[66301]: A.B.C.D:28689 [26/Aug/2009:18:19:50.034] M-front M-native/ms1 -1/1/0/-1/3 -1 339 - - CD-- 0/0/0/0/0 0/0 "<BADREQ>"
>
> 1) What does "<BADREQ>" mean? I see no description of that field in
> documentation of TCP log format.

this is because of "option httplog".

> 2) Why *all* requests are being logged?
> (note option dontlog-normal in default section).
> How should I change configuration to log only important events
> (errors) and do not log the fact connection was made and served?

Hmmm dontlog-normal only works in HTTP mode. Could you please explain what type of normal connections you would want to log and what type you would not want to log ? It could help making a choice of implementation of dontlog-normal for tcplog.

Regards,
Willy Received on 2009/08/27 06:39

This archive was generated by hypermail 2.2.0 : 2009/08/27 06:45 CEST