Solved

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

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ubuntu not booting - How get past GRUB? 3 41
EIGRP STUB 19 70
Lightweight Networking 9 34
How to simulate latency? 5 23
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
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…
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…

785 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