squid4.12 access_log

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

squid4.12 access_log

Thomas Elsäßer
Dear all,

my squid server are behind  HW loadbalancer. This make TCP  Healthchecks
on squid port.
Now(after update from squid 3 to 4) i have in the log massive  messages:
how can i discard this messages from this two LB ip's?

acl noTransactionError src 10.XX.XX.XX 10.XX.XX.XX
access_log              /var/log/squid4/access.log combined  
!noTransactionError


not working .

Many thanks.

Thomas


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

0x49FCC5E8.asc (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: squid4.12 access_log

Amos Jeffries
Administrator
On 24/07/20 7:06 pm, Thomas Elsaesser wrote:

> Dear all,
>
> my squid server are behind  HW loadbalancer. This make TCP  Healthchecks
> on squid port.
> Now(after update from squid 3 to 4) i have in the log massive  messages:
> how can i discard this messages from this two LB ip's?
>
> acl noTransactionError src 10.XX.XX.XX 10.XX.XX.XX
> access_log              /var/log/squid4/access.log combined 
> !noTransactionError
>

Place this as the first access_log line (order matters for these):

  access_Log none noTransactionError


I would also name that ACL something different. An IP address is not an
error and this choice of rule will prevent logging of *all* traffic from
that IP. "loadbalancer" would be clearer name.


I have not tested this, but you may want to add this extra condition so
when the LB sends actual HTTP it will appear in the logs:

  acl hasRequest has request
  acl dontLog all-of !hasRequest noTransactionError
  access_Log none dontLog


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid4.12 access_log

Amos Jeffries
Administrator
On 28/07/20 7:38 pm, Thomas Elsäßer wrote:

> Dear all,
>
> thnks for the answer. I have tested following config:
>
> acl Loadbalancer src 10.12.56.46 10.12.56.48
> access_log none Loadbalancer
> acl hasRequest has request
> acl dontLog all-of !hasRequest Loadbalancer
> access_log none dontLog
> access_log              /var/log/squid4/access.log combined !Loadbalancer
>
> I need no requests from this IP's in my log.
>
> But this not working.
>
> 10.12.56.48 - - [28/Jul/2020:09:36:44 +0200] "NONE
> error:transaction-end-before-headers NONE/0.0" 0 0 "-" "-" NONE:HIER_NONE
> 10.12.56.46 - - [28/Jul/2020:09:36:46 +0200] "NONE
> error:transaction-end-before-headers NONE/0.0" 0 0 "-" "-" NONE:HIER_NONE
>
> in my logfile.
>

Did you clean the log (eg squid -k rotate) after reconfigure with the
updated squid.conf?

Something is broken in squid.conf if the IP based ACL did not work:

 acl Loadbalancer src 10.12.56.46 10.12.56.48
 access_log none Loadbalancer


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users