Search squid archive

Re: dumb question: how to get http server IP into logs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I looked at:
http://www.squid-cache.org/Doc/config/logformat/

and the default squid logformat:
logformat squid      %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt

Seems to contain the desired pattern.
Am I missing something?

Eliezer

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer@xxxxxxxxxxxx


-----Original Message-----
From: squid-users [mailto:squid-users-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Amos Jeffries
Sent: Monday, July 31, 2017 13:22
To: squid-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re:  dumb question: how to get http server IP into logs?

On 30/07/17 22:02, Jason Haar wrote:
> Hi there
> 
> We're running squid-3.5.23 and use ICAP (if that makes a difference)
> 
> We also use logformat to include certain details in the logs - but I 
> can't see an option for including the actual IP address that squid uses 
> when attempting to fulfil an URL request. eg squid gets told to go to 
> twitter.com <http://twitter.com>, resolves that to 4 IPs, tries 1st - 
> fails, tries 2nd - succeeds. I'd like to record that IP in the logs 
> along with everything else. I can see variables for recording the client 
> and squid-server IP - but not the web server?
> 
> Is that possible? I'm sure older (3.2) squid used to do that by default? 
> (DIRECT/1.2.3.4? <http://1.2.3.4?>). All our logs are now "HIER_DIRECT"
> 

The code you are looking for is %<a .
<http://www.squid-cache.org/Doc/config/logformat/>
"Server IP address of the last server or peer connection"

Amos
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux