[syslog-ng] Apache 2 + logger + syslog-ng

Doyon, Jean-Francois Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Mon Apr 10 20:04:27 CEST 2006


Hello,

I've implemented centralized logging for my web servers using syslog-ng and
Apache's log pipe functionality.

All seemed to work quite well until I noticed that on the log server, where
the entries get writen to file, all log lines get truncated at exactly 400
characters!

I haven't messed with the log_msg_size() setting, which should be at default
2048.  I still tried to increase, just to see, and it didn't change
anything.

I'm using the $MSGONLY template, so that the log file looks exactly like a
regular Apache log file.

On the log server side I have:

------
options { use_dns(no); dns_cache(no); stats(3600); };

source syslog_int { internal(); };

source apache_tcp { tcp(port(1999) keep-alive(yes) tcp-keep-alive(yes)
max-connections(2)); };

destination apache_file { file("/home/atlas/var/log/access_log"
                          template("$MSGONLY\n")
                          template_escape(no)
                         );
                   };

destination syslog_file { file("/home/atlas/var/log/syslog-ng.log"); };

log { source(syslog_int); destination(syslog_file); };

log { source(apache_tcp); destination(apache_file); };
------


And on the log "clients" (the apache machines):

------
options { use_dns(no); dns_cache(no); stats(3600); };

source syslog_int { internal(); };

source apache_stream { unix-stream("/home/atlas/var/log/access_log.socket"
keep-alive(yes)); };

destination syslog_file { file("/home/atlas/var/log/syslog-ng.log"); };

destination apache_tcp { tcp(192.168.100.91 port(1999) tcp-keep-alive(yes));
};

log { source(syslog_int); destination(syslog_file); };

log { source(apache_stream); destination(apache_tcp); };
------

Along with:

CustomLog "|/usr/bin/logger -u /home/atlas/var/log/access_log.socket"
combined


Anybody have any clue as to what's happening here???  I'm out of ideas ...

Thanks!

Jean-François Doyon
Internet Service Development and Systems Support / Spécialiste de
dèveloppements internet et soutien technique
Canada Centre for Remote Sensing/Centre Canadien de télédétection
Natural Resources Canada/Ressources Naturelles Canada
http://atlas.gc.ca
Tel./Tél.: (613) 992-4902
Fax: (613) 947-2410


More information about the syslog-ng mailing list