eldy / AWStats

AWStats Log Analyzer project (official sources)
https://www.awstats.org
369 stars 120 forks source link

With the options -update -config -LogFile, the generated file name misses the domain #149

Open mipon opened 4 years ago

mipon commented 4 years ago

When I manually update logs with the command, AWStats creates a generated text file in the directory specified with the DirData option with the name of something like awstats11201930.txt.

perl /{script path}/awstats.pl -update -config="{config name}" -LogFile="{log path}"

However, the created file name misses the domain and the data is not reflected in the AWStats report page. The file name should be something like awstats11201930.mydomain.com.txt not awstats11201930.txt. I had to rename it manually and then the data was properly shown in the page.

It seems to be reported here (https://serverfault.com/questions/439549/awstats-doesnt-create-data-files-with-site-domain-name-in-them).

Using v7.7.

dariodsa commented 4 years ago

I guess that the problem is probably in LogFile parameter, because I update stats every day using other two parameters. I will look up the code to try to figure it out.

dariodsa commented 4 years ago

Can you specify what is the name of the configuration file? I think that it is the problem.

Olivier-Boudeville commented 4 years ago

Hi, (using awstats 7.7 (build 20180105) from Arch Linux) I think I can confirm that: I have multiple domains and vhosts, each with its own conf and log file, and all their reports have the same statistics (ex: number of unique visitors) in their respective generated page (their "Statistics for: XXX" label is correct, i.e. that is not the same page) whereas these sites have very different traffics. It is possibly indeed that all state ending up in a single file (ex: awstats042020.txt) cause this issue.

Olivier-Boudeville commented 4 years ago

On a second thought, should it be normal that a single awstats state file exists (ex: awstats042020.txt), is it then protected against concurrent write accesses? My setting spawns in parallel as many awstats.pl instances as I have vhosts, so they shan't be able to update the same state file at the same time (possibly another explanation for what looks like a data corruption). Thanks in advance for any hint!