Solved

Squid access log - how to log just the domain, not the whole URL?

Posted on 2007-03-20
5
425 Views
Last Modified: 2008-01-09
In the Squid access log there is a lot of info being logged by default. I have already limited all of the redundant info I am not interested in to save some space. However, the most space is taken by the accessed URL. I don't want to log the whole URL but just the domain name the user accessed - e.g. instead of logging "http://domain.com/somedir/somefile.html" I want to have just "domain.com" written to the logs.

I have read the info at http://www.visolve.com/squid/squid30/logs.php#logformat but could not find the option I am looking for so maybe there is no way around it. But maybe there is ;)

Thanks!

Tomas

0
Comment
Question by:tomfra
  • 2
5 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 18756823
check this URL with an example and folow the thred if you need

http://www.squid-cache.org/mail-archive/squid-users/200610/0584.html
0
 

Author Comment

by:tomfra
ID: 18758182
That's a solution for something completely different I am afraid. They discuss having a separate access log for each of the domains the users visit while I want to have just one access log and simply do not record the whole URL the users visit but just the domain name part.
0
 

Author Comment

by:tomfra
ID: 19186764
I have come to conclusion it is not possible to log just the domain name instead of the full URL with Squid 3. It could probably be done in the source code only which I am not really interested although if someone believes it would be easy enough to "hack" the source in such a way, please let me know.

Apparently, the logical solution is to log the whole URL and get rid of all of the unnecessary info on the log processing script side although there are some disadvantages with this solution too.

Tomas

0
 

Accepted Solution

by:
AnnieMod earned 0 total points
ID: 19389414
PAQed with points refunded (500)

AnnieMod
Cleanup Admin
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now