Re: Apache Compatible HAProxy Log Formatting?

2011-03-09 Thread Willy Tarreau
On Wed, Mar 09, 2011 at 01:10:12AM -0800, Joel Krauska wrote:
> On 3/9/11 1:03 AM, Graeme Donaldson wrote:
> >2011/3/9 Hervé COMMOWICK:
> >>http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
> >>
> >>option httplog [ clf ]
> >>  Enable logging of HTTP request, session state and timers
> >>  May be used in sections :   defaults | frontend | listen | backend
> >> yes   |yes   |   yes  |   yes
> >>  Arguments :
> >>clf   if the "clf" argument is added, then the output format
> >>  will be the CLF format instead of HAProxy's default HTTP format. You
> >>  can use this when you need to feed HAProxy's logs through a specific
> >>  log analyser which only support the CLF format and which is not
> >>  extensible.
> >>
> >
> >Be careful, HAproxy's CLF is Apache's "common log format", not the
> >"combined log format" that Joel originally asked for. The latter also
> >logs the User-Agent and Referer headers.
> >
> >Regards,
> >Graeme.
> >
> 
> Ah yes.
> 
> That's 95% though. I'll take it.
> 
> Combined would be a great addition.

Hey, simply add header captures and you'll get it at a different position
though.

> Even better would be apache style custom format syntax.

No, it serves a different purpose. Some info that apache has are not in
haproxy and many of the info haproxy logs cannot be expressed with the
custom format.

Anyway, we've planned to do a big rework of the logs subsystem to make
them much more extensible.

Regards,
Willy




Re: Apache Compatible HAProxy Log Formatting?

2011-03-09 Thread Joel Krauska

On 3/9/11 1:03 AM, Graeme Donaldson wrote:

2011/3/9 Hervé COMMOWICK:

http://haproxy.1wt.eu/download/1.4/doc/configuration.txt

option httplog [ clf ]
  Enable logging of HTTP request, session state and timers
  May be used in sections :   defaults | frontend | listen | backend
 yes   |yes   |   yes  |   yes
  Arguments :
clf   if the "clf" argument is added, then the output format
  will be the CLF format instead of HAProxy's default HTTP format. You
  can use this when you need to feed HAProxy's logs through a specific
  log analyser which only support the CLF format and which is not
  extensible.



Be careful, HAproxy's CLF is Apache's "common log format", not the
"combined log format" that Joel originally asked for. The latter also
logs the User-Agent and Referer headers.

Regards,
Graeme.



Ah yes.

That's 95% though. I'll take it.

Combined would be a great addition.

Even better would be apache style custom format syntax.

--Joel



Re: Apache Compatible HAProxy Log Formatting?

2011-03-09 Thread Graeme Donaldson
2011/3/9 Hervé COMMOWICK :
> http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
>
> option httplog [ clf ]
>  Enable logging of HTTP request, session state and timers
>  May be used in sections :   defaults | frontend | listen | backend
>                                 yes   |    yes   |   yes  |   yes
>  Arguments :
>    clf       if the "clf" argument is added, then the output format
>  will be the CLF format instead of HAProxy's default HTTP format. You
>  can use this when you need to feed HAProxy's logs through a specific
>  log analyser which only support the CLF format and which is not
>  extensible.
>

Be careful, HAproxy's CLF is Apache's "common log format", not the
"combined log format" that Joel originally asked for. The latter also
logs the User-Agent and Referer headers.

Regards,
Graeme.



Re: Apache Compatible HAProxy Log Formatting?

2011-03-09 Thread Hervé COMMOWICK
On Wed, 09 Mar 2011 00:55:02 -0800
Joel Krauska  wrote:

> On 3/9/11 12:51 AM, Hervé COMMOWICK wrote:
> > On Wed, 09 Mar 2011 00:40:12 -0800
> > Joel Krauska  wrote:
> >
> >> Has anyone worked out a way to get HAProxy to output logging in an
> >> Apache "Combined Log Format"?
> >>
> >> Most log analysis tools out there already speak Apache log format
> >> and I was hoping to avoid writing a parser for what is essentially
> >> mostly the same information.
> >>
> >> Anyone got a work around for this situation?
> >>
> >> Best,
> >>
> >> Joel
> >>
> >
> > Hi Joel,
> >
> > you can try "option httplog clf" instead of "option httplog"
> 
> 
> Thanks Herve.
> 
> Somehow I couldn't find that in the docs, but it's right
> there... !$&%..
> 
> Is there a FAQ?
> 
> Cheers,
> 
> Joel
> 

http://haproxy.1wt.eu/download/1.4/doc/configuration.txt

option httplog [ clf ]
  Enable logging of HTTP request, session state and timers
  May be used in sections :   defaults | frontend | listen | backend
 yes   |yes   |   yes  |   yes
  Arguments :
clf   if the "clf" argument is added, then the output format
  will be the CLF format instead of HAProxy's default HTTP format. You
  can use this when you need to feed HAProxy's logs through a specific
  log analyser which only support the CLF format and which is not
  extensible.

-- 
Your Network supports your *BUSINESS !*
Appliances de *contrôle d'activité* et d'*optimisation* du réseau
EXCELIANCE - Rule your Network ! - www.exceliance.fr
ZAC des Metz - 3 Rue du petit robinson
78350 Jouy en Josas
Tél: +33 1 30 67 60 74 - Fax: +33 1 75 43 40 70




Re: Apache Compatible HAProxy Log Formatting?

2011-03-09 Thread Joel Krauska

On 3/9/11 12:51 AM, Hervé COMMOWICK wrote:

On Wed, 09 Mar 2011 00:40:12 -0800
Joel Krauska  wrote:


Has anyone worked out a way to get HAProxy to output logging in an
Apache "Combined Log Format"?

Most log analysis tools out there already speak Apache log format and
I was hoping to avoid writing a parser for what is essentially mostly
the same information.

Anyone got a work around for this situation?

Best,

Joel



Hi Joel,

you can try "option httplog clf" instead of "option httplog"



Thanks Herve.

Somehow I couldn't find that in the docs, but it's right there... !$&%..

Is there a FAQ?

Cheers,

Joel



Re: Apache Compatible HAProxy Log Formatting?

2011-03-09 Thread Hervé COMMOWICK
On Wed, 09 Mar 2011 00:40:12 -0800
Joel Krauska  wrote:

> Has anyone worked out a way to get HAProxy to output logging in an 
> Apache "Combined Log Format"?
> 
> Most log analysis tools out there already speak Apache log format and
> I was hoping to avoid writing a parser for what is essentially mostly
> the same information.
> 
> Anyone got a work around for this situation?
> 
> Best,
> 
> Joel
> 

Hi Joel,

you can try "option httplog clf" instead of "option httplog"

Regards,

Hervé.

-- 
Your Network supports your *BUSINESS !*
Appliances de *contrôle d'activité* et d'*optimisation* du réseau
EXCELIANCE - Rule your Network ! - www.exceliance.fr
ZAC des Metz - 3 Rue du petit robinson
78350 Jouy en Josas
Tél: +33 1 30 67 60 74 - Fax: +33 1 75 43 40 70