Solved

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

Posted on 2007-03-20
5
427 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

919 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

19 Experts available now in Live!

Get 1:1 Help Now