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/
125 stars 36 forks source link

Preserv option doesn't work #204

Closed cvItvre closed 5 years ago

cvItvre commented 5 years ago

Hi, I'm trying to rotate my logs statistics with -p option, but seems like it doesn't work.

I'm execuitng squidanalyzer like this:

/usr/local/bin/squid-analyzer -p 1 --no-week-stat -d

When I access the web page, the calendar in the upper right corner of the page still has statistics for jan, feb, and april. What am I doing wrong?

darold commented 5 years ago

You may have the link to the obsolete statistics but you may have a 404 error. To rebuild the index use -r | --rebuild option, simply run squid-analyzer as follow:

squid-analyser --rebuild
cvItvre commented 5 years ago

Thank you!!!

cvItvre commented 5 years ago

Hello again, I'm sorry but I thought that the problem was solved, but I was using the wrong log file. So, I did what you told me to do, but i had the same result. Bellow is the step that I tried.

squid-analyzer -p1 -d
./parse-html #script for change the user-aliases file
squid-analyzer -r -d

Below is the screenshot of the squidanalyzer after the realization of the steps above.

Screenshot_2019-05-20 SquidAnalyzer 6 6 Report

darold commented 5 years ago

Commit 31f4ad3 might fix the problem, obsolete statistics was not removed if an history file is not present.

cvItvre commented 5 years ago

Thanks bro, it's working