[squid-users] Log to statsd

David Touzeau david at articatech.com
Wed Aug 11 09:56:17 UTC 2021


Basically syslogd can do what you want : send via TCP, HTTP, UDP

So the deal is to use

logformat my_metrics      [statsd] %icap::tt %<pt %tr
icap_log: syslog:local6.info my_metrics

and add a file inside /etc/rsyslog.d/icap_metrics.conf



  if  ($programname =='squid') then {
          if ($msg contains "[statsd]") then {
         action(type="omfwd" Target="x.x.x.x" Port="1825" Protocol="tcp")
         }
         & stop
}



Le 11/08/2021 à 10:51, Moti Berger a écrit :
> Hi
>
> Is there a way to configure Squid to output the logs to statsd rather 
> than a file?
> Today I have this:
>
>     +logformat my_metrics  %icap::tt %<pt %tr
>     +access_log daemon:/var/log/squid/my_metrics.log my_metrics
>
>
> However I would like to avoid the overhead in parsing the log file by 
> using statsd or something similar.
>
> Thanks,
> Moti
>
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20210811/f05b4ece/attachment.htm>


More information about the squid-users mailing list