[squid-users] Squid logging to UDP logs multiple lines at the same time

Matt Pson squid at pson.org
Fri May 4 08:44:57 UTC 2018


Hello,
I have set up several Squid servers running 3.5.27 on Ubuntu 16.04 LTS (behind keepalived and haproxy to create a ha/load balanced setup) and having are some problems with logging. In order to have a single logfile I decided to send the log directly using UDP to a separate server running rsyslogd. 

Each Squid is configured with:

access_log     udp://squid-logserver.domain.com:10514

The rsyslogd server is configured with:

Module (load="imudp")
# rsyslog Input Modules
input(type="imudp" port="10514" ruleset="Squid")
# Squid RulesSet
# make all squid input from the frontends end up here
ruleset(name="Squid") {
        action(type="omfile"
                file="/var/log/squid/access.log")
        }

This works quite well and logs are sent to the server which receives them and puts them in the log file as expected. But the logs are not sent line by line but instead multiple lines at the same time (the size is approx. a UDP packet of lines, ~1300 bytes) which makes the log file quite messed up.

What am I missing here? 
I want my log to be readable ;)

/Matt Pson


More information about the squid-users mailing list