Re: TCP log format question

From: Dmitry Sivachenko <mitya#cavia.pp.ru>
Date: Thu, 27 Aug 2009 13:08:22 +0400


On Thu, Aug 27, 2009 at 06:39:51AM +0200, Willy Tarreau wrote:
> 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".

Aha, I see, i had an impression 'option httplog' will be ignored in TCP mode.

I removed it and "<BADREQ>" disappeared from the log.

>
> > 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.

Ok, I see, though it is completely unclean after reading the manual. This should probably be explicitly mentioned.

> 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.
>

I want to log exactly what manual states:

#######################

Setting this option ensures that
normal connections, those which experience no error, no timeout, no retry nor redispatch, will not be logged.
#######################

... but for TCP mode proxy.

I mean I want to see in logs only those connection that were redispatched, timeouted, etc.

Thanks! Received on 2009/08/27 11:08

This archive was generated by hypermail 2.2.0 : 2009/08/27 11:15 CEST