AWStats icon indicating copy to clipboard operation
AWStats copied to clipboard

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

Open mipon opened this issue 6 years ago • 4 comments

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.

mipon avatar Dec 14 '19 22:12 mipon

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 avatar Dec 15 '19 09:12 dariodsa

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

dariodsa avatar Dec 16 '19 11:12 dariodsa

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 avatar Apr 15 '20 20:04 Olivier-Boudeville

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!

Olivier-Boudeville avatar Apr 16 '20 09:04 Olivier-Boudeville