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

Top URLs for users? #145

Closed GrahamWing closed 8 years ago

GrahamWing commented 8 years ago

Is there a way to only show the top X number of sites for the user report? After a week of usage, it shows that I've visited 2600+ sites. I would assume when I get to the end of the year, it'll be 10,000+ sites. That would be a huge report. I'd like to be able to show a users top 25 (or whatever number) sites for that time period (day, week, month, year). Is that possible?

darold commented 8 years ago

You have the TopNumber configuration directive to control that limit. It is set to 100 in the configuration file and internally to top 10. SO normally you might have only the top 100 Urls in the lists.

GrahamWing commented 8 years ago

That works for me on the "Top URLs" report (I currently have it set to 25, but not for the user report. To be clear, this is what I see. I pull up Squid Analyzer and click on "Stat 2016". I click on the "Aug" link to see August. I click on the Top URLs link and I see the Top 25 URL Hits on 2016-08 and so on. I click on the Users link to see the users for August I see a list of usernames. I click on my username, and it shows 201 URLs.

So the Top URLs report is only showing the 25, but the total number of URLs for a user is showing on the individual user page. I'd like to be able to only show the top whatever number of sites on the user page.

Am I missing something? 2016-08-30_135746 2016-08-30_135809

darold commented 8 years ago

I see in your last screenshot that you have an other issue, there is an overlaps between chart. If you are using the latest version of squidanalyzer, v6.5 I think this is because you have not updated the css and js files. In this case you have to override all files in /var/www/squidanalyzer/ (if this is your output directory) with the files from the resources/ directory (source code).

darold commented 8 years ago

Commit e2a8293 fix missing limit total number of URLs shown for a user to TopNumber. Please download latest development code from github and override your installation.

Regards,

GrahamWing commented 8 years ago

Thanks for fixing the TopNumber for users. I'll download the latest code and test it out. As for the overlapping charts, that is because of the small window I took the screenshot from. When I view it in a larger window, it looks fine. I've also played with the layout a bit, so that might be my problem. But thanks for the suggestion.

GrahamWing commented 8 years ago

I've updated the files, and now it is showing the top 25. Thanks for fixing that.

One other request related to this... When I looked at the report after doing the update, it showed: Number of Urls: 2005 but then it showed the top 25 (what I've set TopNumber to). This may be confusing to some users. Can you update the report header/description to show something like: "Showing the Top 25 (whatever the TopNumber is set to) out of 2,005 URLs (or whatever the total number is)"?

darold commented 8 years ago

Commit d3528df try to update the report header/description to show better label.

Thanks for the report.