<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#464646" bgcolor="#FFFFFF">
<font face="Arial">Basically syslogd can do what you want : send via
TCP, HTTP, UDP<br>
<br>
So the deal is to use <br>
</font><br>
<font face="Arial">logformat my_metrics [statsd] %icap::tt
%<pt %tr<br>
icap_log: syslog:local6.info my_metrics<br>
<br>
and add a file inside /etc/rsyslog.d/icap_metrics.conf<br>
<br>
<br>
<br>
if ($programname =='squid') then {<br>
if ($msg contains "</font><font face="Arial"><font
face="Arial">[statsd]") then {<br>
</font> action(type="omfwd" Target="x.x.x.x"
Port="1825" Protocol="tcp")<br>
}<br>
& stop<br>
}<br>
<br>
<br>
</font><br>
<div class="moz-cite-prefix">Le 11/08/2021 à 10:51, Moti Berger a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAGSk-43R8AwcQ9YUPuzt+oG=p383yghqyaHg7yAxnCon4TX19g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi
<div><br>
</div>
<div>Is there a way to configure Squid to output the logs to
statsd rather than a file?</div>
<div>Today I have this:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">+logformat my_metrics
%icap::tt %<pt %tr<br>
+access_log daemon:/var/log/squid/my_metrics.log my_metrics<br>
</blockquote>
</div>
<div><br>
</div>
<div>However I would like to avoid the overhead in parsing the
log file by using statsd or something similar.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Moti</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
squid-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a>
</pre>
</blockquote>
<br>
</body>
</html>