Exclude transaction from being logged

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

Exclude transaction from being logged

neok
Hi,
I recently compiled SQUID 4.14 with SNMP support. I use Zabbix to monitor SQUID by SNMP and it really works fine. 
One thing I see is that because Zabbix checks status of SQUID port then SQUID generates a lot of logs like this: 
NONE/000 0 NONE error:transaction-end-before-headers - HIER_NONE/- -

I know that this is not an error. But I want to exclude this log when the Zabbix server checks the port status of SQUID. Zabbix server does not use the SQUID as a proxy.

Some relevant configs (my setup is very basic and similar to defaults SQUID config):
# SNMP monitoring with Zabbix
acl zabbix snmp_community zabbix_public
acl zabbix_proxy src x.x.x.x
snmp_port 3401
snmp_access allow zabbix zabbix_proxy
snmp_access deny all
[...]
# default SQUID rules
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access deny to_localhost
http_access allow localhost

# Allow users to use internet and deny to all others
http_access allow localnet
http_access deny all

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

Re: Exclude transaction from being logged

Alex Rousskov
On 2/26/21 12:36 PM, Service MV wrote:

> NONE/000 0 NONE error:transaction-end-before-headers - HIER_NONE/- -
>
> I know that this is not an error. But I want to exclude this log when
> the Zabbix server checks the port status of SQUID. Zabbix server does
> not use the SQUID as a proxy.

If you do not want to see what Zabbix is doing to your Squid, you can
exclude its requests from access.log. For example, if you do not want to
see any requests from Zabbix IP address:

  acl zabbix_proxy src x.x.x.x
  access_log none zabbix_proxy


HTH,

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

Re: Exclude transaction from being logged

neok
Ok, but whit this two lines disabled completely access logs. I've no more access_log directives configured.

I need disabled only zabbix_proxy IP logs.

Thanks in advance

Gabriel

El vie., 26 feb. 2021 16:21, Alex Rousskov <[hidden email]> escribió:
On 2/26/21 12:36 PM, Service MV wrote:

> NONE/000 0 NONE error:transaction-end-before-headers - HIER_NONE/- -
>
> I know that this is not an error. But I want to exclude this log when
> the Zabbix server checks the port status of SQUID. Zabbix server does
> not use the SQUID as a proxy.

If you do not want to see what Zabbix is doing to your Squid, you can
exclude its requests from access.log. For example, if you do not want to
see any requests from Zabbix IP address:

  acl zabbix_proxy src x.x.x.x
  access_log none zabbix_proxy


HTH,

Alex.

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

Re: Exclude transaction from being logged

Alex Rousskov
On 2/26/21 2:58 PM, Service MV wrote:
> Ok, but whit this two lines disabled completely access logs. I've no
> more access_log directives configured.

Yeah, this outcome is surprising to many admins (and there are also
related bugs in Squid code).

To see all other records, add access_log lines that define how you want
the rest of the records to be logged. For example, if you want Squid to
use the default record format and other defaults, then try this untested
sketch:

   acl zabbix_proxy src x.x.x.x
   access_log none zabbix_proxy
   access_log daemon:/specify/exact/log/file/location/here

You can see the default access_log configuration specific to your Squid
build in squid.conf.documented.


HTH,

Alex.



> El vie., 26 feb. 2021 16:21, Alex Rousskov escribió:
>
>     On 2/26/21 12:36 PM, Service MV wrote:
>
>     > NONE/000 0 NONE error:transaction-end-before-headers - HIER_NONE/- -
>     >
>     > I know that this is not an error. But I want to exclude this log when
>     > the Zabbix server checks the port status of SQUID. Zabbix server does
>     > not use the SQUID as a proxy.
>
>     If you do not want to see what Zabbix is doing to your Squid, you can
>     exclude its requests from access.log. For example, if you do not want to
>     see any requests from Zabbix IP address:
>
>       acl zabbix_proxy src x.x.x.x
>       access_log none zabbix_proxy
>
>
>     HTH,
>
>     Alex.
>

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

Re: Exclude transaction from being logged

neok
Unfortunately, the log that I whant to avoid is being still logged.

El vie., 26 feb. 2021 17:14, Alex Rousskov <[hidden email]> escribió:
On 2/26/21 2:58 PM, Service MV wrote:
> Ok, but whit this two lines disabled completely access logs. I've no
> more access_log directives configured.

Yeah, this outcome is surprising to many admins (and there are also
related bugs in Squid code).

To see all other records, add access_log lines that define how you want
the rest of the records to be logged. For example, if you want Squid to
use the default record format and other defaults, then try this untested
sketch:

   acl zabbix_proxy src x.x.x.x
   access_log none zabbix_proxy
   access_log daemon:/specify/exact/log/file/location/here

You can see the default access_log configuration specific to your Squid
build in squid.conf.documented.


HTH,

Alex.



> El vie., 26 feb. 2021 16:21, Alex Rousskov escribió:
>
>     On 2/26/21 12:36 PM, Service MV wrote:
>
>     > NONE/000 0 NONE error:transaction-end-before-headers - HIER_NONE/- -
>     >
>     > I know that this is not an error. But I want to exclude this log when
>     > the Zabbix server checks the port status of SQUID. Zabbix server does
>     > not use the SQUID as a proxy.
>
>     If you do not want to see what Zabbix is doing to your Squid, you can
>     exclude its requests from access.log. For example, if you do not want to
>     see any requests from Zabbix IP address:
>
>       acl zabbix_proxy src x.x.x.x
>       access_log none zabbix_proxy
>
>
>     HTH,
>
>     Alex.
>


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

Re: Exclude transaction from being logged

Alex Rousskov
On 3/1/21 8:35 PM, Service MV wrote:
> Unfortunately, the log that I whant to avoid is being still logged.

Do the unwanted logged records match zabbix_proxy?

* If yes, I am out of ideas. If you share a debugging log dedicated to
the incorrectly logged transaction[1], I may be able to figure it out.

* If not, then perhaps I misunderstood what your zabbix_proxy ACL means
to you. You may need a different ACL.

[1]
https://wiki.squid-cache.org/SquidFaq/BugReporting#Debugging_a_single_transaction

Alex.


> El vie., 26 feb. 2021 17:14, Alex Rousskov
> <[hidden email]
> <mailto:[hidden email]>> escribió:
>
>     On 2/26/21 2:58 PM, Service MV wrote:
>     > Ok, but whit this two lines disabled completely access logs. I've no
>     > more access_log directives configured.
>
>     Yeah, this outcome is surprising to many admins (and there are also
>     related bugs in Squid code).
>
>     To see all other records, add access_log lines that define how you want
>     the rest of the records to be logged. For example, if you want Squid to
>     use the default record format and other defaults, then try this untested
>     sketch:
>
>        acl zabbix_proxy src x.x.x.x
>        access_log none zabbix_proxy
>        access_log daemon:/specify/exact/log/file/location/here
>
>     You can see the default access_log configuration specific to your Squid
>     build in squid.conf.documented.
>
>
>     HTH,
>
>     Alex.
>
>
>
>     > El vie., 26 feb. 2021 16:21, Alex Rousskov escribió:
>     >
>     >     On 2/26/21 12:36 PM, Service MV wrote:
>     >
>     >     > NONE/000 0 NONE error:transaction-end-before-headers -
>     HIER_NONE/- -
>     >     >
>     >     > I know that this is not an error. But I want to exclude this
>     log when
>     >     > the Zabbix server checks the port status of SQUID. Zabbix
>     server does
>     >     > not use the SQUID as a proxy.
>     >
>     >     If you do not want to see what Zabbix is doing to your Squid,
>     you can
>     >     exclude its requests from access.log. For example, if you do
>     not want to
>     >     see any requests from Zabbix IP address:
>     >
>     >       acl zabbix_proxy src x.x.x.x
>     >       access_log none zabbix_proxy
>     >
>     >
>     >     HTH,
>     >
>     >     Alex.
>     >
>

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