LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-05-2009, 03:48 AM   #1
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

Rep: Reputation: Disabled
Tool to parse squid log file.


Hello,

Another question from me.
I have squid server running well. I need to parse the squid log file. I have calamaris running and it works. But I am looking for some parser that will parse the file rather than analyzing it.
Parse in the sense, I am not looking for output that most of the tools give in different formats.
I need the same output squid log file has but only in some proper format. Like in some tabular format or something.
If there is nothing I am willing to put some effort to write one but I do not know Perl or awk or sed. I am willing to learn but it will take more time than I have.
 
Old 02-05-2009, 09:12 PM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
See if squidalyser will do what you want. It has been a few years since I last used it but I configured it to run from cron and dump to a MySQL database. From there you can do with it as you wish...
 
Old 02-05-2009, 11:06 PM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

Original Poster
Rep: Reputation: Disabled
I do not want to use the database. It is unnecessary for me. I just need what is there in log file but just in tabular format. I am ready to write it down but I do not know Perl. So if anyone can help me out how to go about it?
 
Old 02-08-2009, 11:40 PM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

Original Poster
Rep: Reputation: Disabled
This is what my squid log looks like:


Code:
 09/Feb/2009:10:58:39 +0530.246    258 192.168.1.97 TCP_MISS/200 454 GET http://ishare.rediff.com/logdownload.html? - DIRECT/203.199.74.17 text/html
Is there any way I can parse this line using Perl so that every option is shown in a tabular format in a table? It could be anything. A web page in html format or a simple file with just text formatted in tabular format.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid Proxy is unable to log "access.log" file. nishith Linux - Server 6 08-10-2008 12:00 AM
Squid logging access.log file revinking Linux - Newbie 1 07-28-2008 05:02 AM
How to graph contents of squid log file gmtonga Linux - Newbie 1 01-22-2008 06:01 AM
parse log file hourly onewave Programming 2 03-28-2005 01:52 PM
what log file generator that support squid log? heero82 Linux - Software 2 07-11-2003 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration