]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] log: add support for passing the forwarded hostname
authorJoe Williams <joe@joetify.com>
Wed, 29 Dec 2010 16:05:48 +0000 (17:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Dec 2010 16:05:48 +0000 (17:05 +0100)
commitdf5b38fac1788e6a134095459170a618a1c23388
tree8152741bbe8e8162a7b684323d6a0b241e7b008b
parent9ea2b9ac753697aed856b9a912b67a45c69bb8f8
[MINOR] log: add support for passing the forwarded hostname

Haproxy does not include the hostname rather the IP of the machine in
the syslog headers it sends. Unfortunately this means that for each log
line rsyslog does a reverse dns on the client IP and in the case of
non-routable IPs one gets the public hostname not the internal one.

While this is valid according to RFC3164 as one might imagine this is
troublsome if you have some machines with public IPs, internal IPs, no
reverse DNS entries, etc and you want a standardized hostname based log
directory structure. The rfc says the preferred value is the hostname.

This patch adds a global "log-send-hostname" statement which accepts an
optional string to force the host name. If unset, the local host name
is used.
doc/configuration.txt
include/types/global.h
src/cfgparse.c
src/haproxy.c
src/log.c