Re: Quick question on logging from HaProxy.

From: Jeremy Hinegardner <jeremy#hinegardner.org>
Date: Mon, 22 Oct 2007 10:14:55 -0600


On Mon, Oct 22, 2007 at 03:30:54PM +0200, Willy Tarreau wrote:
> Hi John,
>
> On Mon, Oct 22, 2007 at 08:52:38AM -0400, Lauro, John wrote:
> > First make sure you have syslog listening on udp. By default for
> > newer installs, syslog only uses sockets which haproxy doesn't
> > support.
>
> To be fair, it's not a matter of not supporting, because using
> syslog() is quite trivial. It's a problem with /dev/log being
> unreachable for chrooted processes. Even if you can attach to
> it upon startup, you cannot reconnect once syslogd reloads.
> And even klogd which is not chrooted silently dies if syslogd
> breaks the socket! What an awful design!
>
> However nowadays, almost everybody has switched to syslog-ng at
> least for performance reasons when it's not for flexibility. Since
> syslog-ng has no problem listening to multiple sources, I think
> that I will add the unix socket feature in haproxy so that people
> can simply put one dedicated syslog-ng socket in haproxy's chroot
> and be fine with it.

In a slightly relevant issue, I have written an haproxy log parser to take the haproxy log lines from syslog and put them into a sqlite database for later perusal. It does incremental inserts and you can have some basic command line reporting come out of it.

Part of the the package is an update to the haproxy logformat documentation (which isn't quite done).

I'll announce 'halog' here in the next week I hope, along with the documentation patch for Willy. I've been using it in production with haproxy 1.3.12 and 1.3.7 for a while now and its definitely helped us spot some issues.

enjoy,

-jeremy

-- 
========================================================================
 Jeremy Hinegardner                              jeremy#hinegardner.org 
Received on 2007/10/22 18:14

This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET