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

Unable to generate report #158

Closed jeffgebhardt closed 7 years ago

jeffgebhardt commented 7 years ago

I am running Ubuntu 14.04, SquidAnalyzer 6.5, Squid3 and Apache2. I am using the native Squid3 log format and their is data in the access log.

The output of squid-analyzer -d /var/log/squid3/access.log:

SquidAnalyzer version 6.5
Starting to parse logfile /var/log/squid3/access.log.
DEBUG: this file will be parsed, no history found.
Reading file /var/log/squid3/access.log from offset 0 to end.
SQUID LOG SET START TIME: Fri Mar 24 14:41:55 2017
No new log registered...
DEBUG: the log statistics gathering took: 0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 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.00 usr +  0.00 sys =  0.00 CPU)

Output of tree /var/www/squidanalyzer:

/var/www/squidanalyzer/
├── flotr2.js
├── images
│   ├── back-arrow.png
│   ├── cursor.png
│   ├── domain.png
│   ├── info.png
│   ├── logo-squidanalyzer.png
│   ├── network.png
│   └── user.png
├── index.html
├── sorttable.js
└── squidanalyzer.css

apache.conf:

Alias /squidreport /var/www/squidanalyzer
<Directory /var/www/squidanalyzer>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    Allow from "My Office Subnet"
</Directory>

Any ideas? Thanks!

darold commented 7 years ago

Hi,

This is a fresh install so log parsing might be done unless the log file is empty or doesn't have the right format. Any other problem like permission would be reported by squidanalyzer. Please post here three or four lines of your access log.

Regards,

jeffgebhardt commented 7 years ago

@darold, thanks for the quick reply! Yes it is a fresh install, below is a snapshot of "var/log/squid3/access.log" (also I changed the source IP address, its not really google DNS):

1490718887.817      0 8.8.8.8 TCP_DENIED_REPLY/403 2975 GET http://207.110.96.1/ - HIER_NONE/- text/html
1490718892.468      0 8.8.8.8 TCP_DENIED_REPLY/403 2975 GET http://207.110.96.1/ - HIER_NONE/- text/html
1490718893.565      0 8.8.8.8 TCP_DENIED_REPLY/403 2975 GET http://207.110.96.1/ - HIER_NONE/- text/html
1490718894.341      0 8.8.8.8 TCP_DENIED_REPLY/403 2975 GET http://207.110.96.1/ - HIER_NONE/- text/html

Also don't try to access 207.110.96.1, we are using Squid to block known bad IP's.

darold commented 7 years ago

Thanks Jeff,

Commit a8bd89b might solve the issue, please download latest development code and give it a try.

jeffgebhardt commented 7 years ago

Cool, i'll give it a shot and report back.

jeffgebhardt commented 7 years ago

@darold, we are in business! Thanks for the help and starred your project!