Re: Remote logging

From: Willy Tarreau <w#1wt.eu>
Date: Sun, 11 Jan 2009 11:13:49 +0100


On Wed, Jan 07, 2009 at 02:05:12PM -0800, Daniel Gentleman wrote:
> Hi HAProxy users.
> I'm trying to get my instance of HAProxy to log everything to a remote
> syslog server. I can't even get ot to write to the LOCAL Syslog server.
> This is on FreeBSD 7.0-STABLE.

that's unexpected.

> Some snippits:
>
>
> /usr/local/etc/haproxy.conf
>
> global
> log 127.0.0.1 local0 notice

With "notice", you will not get traffic, only startups/shutdowns and server state transitions.

> ..
> defaults
> log global
> mode http
> option httplog
> option logasap
> option dontlognull

everything's right till here IMHO.

> /etc/syslog.conf
> local0.* /var/log/haproxy.log
>
>
>
> /etc/rc.conf
> syslogd_enable="YES"
> syslogd_flags="-C -a 127.0.0.1"

just guessing, I don't have a FreeBSD here, but on my OpenBSD I see that I added "-u" to listen o the UDP socket, instead of "-a 127.0.0.1". Those might be different, but are you sure you don't need another special flag for syslogd to accept UDP logs from localhost ?

Also, you might be able to test your syslog setup using netcat :

  # echo "<133> blah" | nc -u 127.0.0.1 514

(133 is 16*8 + 5 = local0.notice)

You must get the log in the file with this. Otherwise it indicates an issue with your syslog configuration.

Regards,
Willy Received on 2009/01/11 11:13

This archive was generated by hypermail 2.2.0 : 2009/01/11 11:15 CET