darold / squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control.
http://squidanalyzer.darold.net/
126 stars 36 forks source link

No new log registered... #86

Closed cidropass closed 9 years ago

cidropass commented 9 years ago

Hello, I've installed Squid Analyzer according to the documentation, but it seems not to be parsing my log. After some research I've changed the log format to native 'squid' format, but still no result. Output of command in debug mode :

/usr/local/bin/squid-analyzer -d Starting to parse logfile /data/logs/proxy02vsrv/proxy02vsrv.log. DEBUG: this file will be parsed, no history found. Reading file /data/logs/proxy02vsrv/proxy02vsrv.log from offset 0 to end. No new log registered... DEBUG: the log statistics gathering took: 0 wallclock secs ( 0.09 usr + 0.00 sys = 0.09 CPU) Skipping HTML build. DEBUG: generating HTML output took: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) DEBUG: total execution time: 0 wallclock secs ( 0.09 usr + 0.00 sys = 0.09 CPU)

Size of the logfile :

ls -l /data/logs/proxy02vsrv total 5424 -rw-r--r--. 1 root root 5538668 Jun 26 14:49 proxy02vsrv.log

Sample line from logfile : 1435323797.124 1 10.1.0.39 TCP_DENIED/407 4157 CONNECT cdn.exactag.com:443 - NONE/- text/html

obviously something is wrong with the config but I can't figure out what. Can you please give me a hint ?

Thanks already.

darold commented 9 years ago

I don't know the version of squidanalyzer you are using but please use latest code from github I'm not able to reproduce the issue using it. Here what you should obtain using latest code and your sample log line:

sudo perl squid-analyzer -d sample.log SquidAnalyzer version 6.2 Starting to parse logfile toto.log. DEBUG: this file will be parsed, no history found. Reading file toto.log from offset 0 to end. SET START TIME: ven. juin 26 15:03:17 2015 Appending data into /var/www/squidanalyzer/2015/06/26 END TIME : ven. juin 26 15:03:17 2015 Read 1 lines, matched 1 and found 1 new lines Reordering daily data files now... Saving data into /var/www/squidanalyzer/2015/06/26 Generating weekly data files now... Compute and dump weekly statistics for week 26 on 2015 Saving data into /var/www/squidanalyzer/2015/week26 Generating monthly data files now... Compute and dump month statistics for 2015/06 Saving data into /var/www/squidanalyzer/2015/06 Generating yearly data files now... Compute and dump year statistics for 2015 Saving data into /var/www/squidanalyzer/2015 DEBUG: the log statistics gathering took: 0 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU) Building HTML output into /var/www/squidanalyzer Generating statistics for day 2015-06-26 User statistics in /var/www/squidanalyzer/2015/06/26... Mime type statistics in /var/www/squidanalyzer/2015/06/26... Network statistics in /var/www/squidanalyzer/2015/06/26... Top URL statistics in /var/www/squidanalyzer/2015/06/26... Top denied URL statistics in /var/www/squidanalyzer/2015/06/26... Top domain statistics in /var/www/squidanalyzer/2015/06/26... Cache statistics in /var/www/squidanalyzer/2015/06/26... Generating statistics for month 2015-06 User statistics in /var/www/squidanalyzer/2015/06... Mime type statistics in /var/www/squidanalyzer/2015/06... Network statistics in /var/www/squidanalyzer/2015/06... Top URL statistics in /var/www/squidanalyzer/2015/06... Top denied URL statistics in /var/www/squidanalyzer/2015/06... Top domain statistics in /var/www/squidanalyzer/2015/06... Cache statistics in /var/www/squidanalyzer/2015/06... Generating statistics for week 26 on year 2015 User statistics in /var/www/squidanalyzer/2015/week26... Mime type statistics in /var/www/squidanalyzer/2015/week26... Network statistics in /var/www/squidanalyzer/2015/week26... Top URL statistics in /var/www/squidanalyzer/2015/week26... Top denied URL statistics in /var/www/squidanalyzer/2015/week26... Top domain statistics in /var/www/squidanalyzer/2015/week26... Cache statistics in /var/www/squidanalyzer/2015/week26... Generating statistics for year 2015 User statistics in /var/www/squidanalyzer/2015... Mime type statistics in /var/www/squidanalyzer/2015... Network statistics in /var/www/squidanalyzer/2015... Top URL statistics in /var/www/squidanalyzer/2015... Top denied URL statistics in /var/www/squidanalyzer/2015... Top domain statistics in /var/www/squidanalyzer/2015... Cache statistics in /var/www/squidanalyzer/2015... DEBUG: generating HTML output took: 0 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU) DEBUG: total execution time: 0 wallclock secs ( 0.02 usr + 0.00 sys = 0.02 CPU)

darold commented 9 years ago

Are you able to parse your log file with latest code?

Regards,

darold commented 9 years ago

Hi,

If you have your log file in common http format, last commit c7e4c8f might fix that long pending issue. Please use latest development code from github and let me know.

Regards,

darold commented 9 years ago

Please update to latest development code, there is two new fixes in last commit 928ed13 that might fix your issue.