AWstats - regenerating reports not working without deleting some files

Go to your file system in /home/yourdomain/awstats and delete all the files except .htaccess. We have to re-generate the report files from scratch. Now go to Virtualmin -> Logs and Reports -> AWstats Configuration. In my case "URL paths to exclude is emply", I will add a path for being excluded: REGEX[/roundcube/]. Let's press Save and Re-Generate Report.

1) Two files are created in /home/yourdomain/awstats. One is awstats122015.yourdomain.com.txt and the other one is a symbolic link to it. Please take a look who are the owners of these files. One is yourdomain which is correct and for the symlink is root. Is this a normal behavior having a file with root ownership into this folder?

2) After re-generating the report you have two files in awstats folder. We won't delete them but we will delete the path we added before for being excluded. Let's "Save and Re-Generate Report" again and see what is happening. Nothing with you reports. You still have on disk the same reports. In my opinion this is an issue because if you add or remove any options from AWstats configuration it won't change your reports at all. For every option changed you have to delete the files from disk and regenerate new ones.

AND A SUGGESTION TO IMPROVE FUNCTIONALITY: please change both "URL path to exclude" and "File extensions to exclude" from input text boxes to textarea. If you have more than 2 paths to exclude, you have to scroll the input text box from left to right. A textarea box will help us to organize much better these paths line by line. "Same for File extensions to exclude".

Thank you.

Status: 
Closed (fixed)

Comments

Problem (1) isn't really an issue as symlink ownership doesn't mean anything, but it will be fixed in the next release of the AWstats plugin for virtualmin.

For problem (2), which files are you suggesting should be deleted? The .txt files contain state that may no longer be in the original log files.

1) That symlink in my opinion shouldn't be created. I don't understand its meaning in the same folder with root ownership.

2) AWstats takes webserver access log and processes it. I re-generated manually the report on December the 22th (Update link in AWstats) . Four days later I wanted to exclude some path URLs from AWstat report. I filled in Virtualmin interface the form with path strings then I pressed Save and Re-generate. The excluded paths were not removed from report before and after the 26th (assuming the changes will be apply to current access log). I checked when was the last cronjob for AWstats and there were many links in the access log for being processed. In order to get a correct report with the new changes I used the whole month access log again. But it was important to delete the previous report files. By deleting the .txt files for December I was able getting a new report with the paths excluded correctly, before and after December the 26th.

My issue report to you is that Re-generation process is not using the changes in AWstats plugin configuration. Normally if I want to exclude some paths on 25th, all the appended information from last report generation to the moment I press Save and Re-generation button should contain the changes (paths excluded), but they won't be excluded.

It isn't really possible to re-generate the report in this situation, because the original Apache log files may have been rotated away already. The .txt files just contain summary information, so if you delete them and re-generate data may be lost.

Ok, let's say it won't rotate and I would like to exclude an URL path from reporting. I go to AWstats Configuration, in "URL path to exclude" I fill in REGEX[/turpentine/] then I click [Save and Re-Generate Report] button.

Question: Re-generating Report is for the time period from pushing Save button and forward or will operate for the current Apache log file? Because if this re-generate is valid for the current Apache log I should get a new report with that path removed.

Plead read again this issue for my observations and comments. Thank you.

Perhaps what we need is a "complete re-generate" button which deletes all .txt files and forces re-generation from the underlying logs.

Correct. As it is now re-generation is functioning from last re-generation (cron) to the moment you press [Save and Re-generation] button. Excluding paths will not affect the whole report of the month or other report(s) in case you don't use logrotation or have long time rotations (e.g. 3 months).

A complete re-generate as you suggested will delete the existing report(s) and will create new one including the changes made in AWstats settings. Of course for the existing webserver log. It was wonderful to generate all report from archives but this is a serious task to do.

Ok, I will look into this and update this bug.

Ok, the next release of the AWstats plugin will have an option to re-generate the report from the original log files.

Status: Active ยป Fixed