[squid-users] Log to statsd
Amos Jeffries
squid3 at treenet.co.nz
Wed Aug 11 13:26:21 UTC 2021
On 11/08/21 8:51 pm, Moti Berger wrote:
> Hi
>
> Is there a way to configure Squid to output the logs to statsd rather
> than a file?
Squid can send log lines to any TCP or UDP receiver which is able to
handle line-oriented records. AFAIK statsd is one such agent.
> Today I have this:
>
> +logformat my_metrics %icap::tt %<pt %tr
> +access_log daemon:/var/log/squid/my_metrics.log my_metrics
>
Say you have the statsd configured to receive on localhost port 1234.
That would be configured in squid.conf as:
access_log tcp://localhost:1234 my_metrics
Since I don't know what input your statsd is expecting I am not able to
provide a logformat right now. But since you are already parsing and
converting the file it should not be too hard to figure out yourself.
Amos
More information about the squid-users
mailing list