I don't know if this is related to #2172485

It simply tells "No statistics found for" my site and this month -- no debug messages in the log. The stats are there, though.

$ LANG=C sudo ls -l /var/lib/awstats/awstats062015.txt
-rw-r--r-- 1 www-data www-data 11847 Jun 24 17:50 /var/lib/awstats/awstats062015.txt
CommentFileSizeAuthor
#7 beta4.png9.52 KBbtbroot
0Screenshot (31).png26.6 KBbtbroot

Comments

  • egfrith committed f27d1e5 on 7.x-1.x
    Issue #2511408 by egfrith: Someone better error messages to diagnose no...
egfrith’s picture

Assigned: Unassigned » egfrith

I've tried adding some better error messages to help diagnose this, though the issue is not fixed yet.

  • egfrith committed ac2a627 on 7.x-1.x
    Issue #2511408 by egfrith: Somewhat better error messages to diagnose no...
btbroot’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0-beta3

Hello.

Nothing have changed in beta3: the behaviour is the same ("No statistics found..."), and no errors in the watchdog.

  • egfrith committed 8d32df0 on 7.x-1.x
    Issue #2511408 by egfrith: No statistics found
    
egfrith’s picture

@btbroot I've done work on a few other issues, and also replaced exit with return throughout. Could you let me know if 7.x-1.0-beta4 still has this problem? If so, do you still get the same screenshot posted at the start of the issue?

btbroot’s picture

Version: 7.x-1.0-beta3 » 7.x-1.0-beta4
StatusFileSize
new9.52 KB

7.x-1.0-beta4 still has this problem, the screenshot is different (see it attached).

Just in case you ask for it, here are the files

$ LANG=C sudo ls -la /var/lib/awstats/
total 756
drwxr-x---  2 www-data www-data   4096 Oct 17 22:30 .
drwxr-xr-x 50 root     root       4096 Jul 11 15:44 ..
-rw-r--r--  1 www-data www-data  51132 Jul  1 00:10 awstats062015.txt
-rw-r--r--  1 www-data www-data 195566 Aug  1 00:10 awstats072015.txt
-rw-r--r--  1 www-data www-data 158154 Sep  1 00:10 awstats082015.txt
-rw-r--r--  1 www-data www-data 196155 Oct  1 00:10 awstats092015.txt
-rw-r--r--  1 www-data www-data 142511 Oct 17 22:30 awstats102015.txt
-rw-r--r--  1 www-data www-data  16154 Oct 17 22:30 dnscachelastupdate.hash

...and here is the server:

$ LANG=C ps aux|grep apache
www-data  6223  0.0  2.2 325684 38924 ?        S    07:11   0:31 /usr/sbin/apache2 -k start
www-data 18565  0.0  2.4 326504 41820 ?        S    14:51   0:11 /usr/sbin/apache2 -k start
www-data 30671  0.1  2.4 326500 42972 ?        S    21:09   0:07 /usr/sbin/apache2 -k start
www-data 32135  0.0  0.8 321200 14248 ?        S    22:27   0:00 /usr/sbin/apache2 -k start
www-data 32137  0.0  2.0 325704 35092 ?        S    22:27   0:00 /usr/sbin/apache2 -k start
www-data 32143  0.1  2.3 329168 40200 ?        S    22:28   0:00 /usr/sbin/apache2 -k start
www-data 32146  0.0  0.8 321200 14288 ?        S    22:28   0:00 /usr/sbin/apache2 -k start
www-data 32147  0.0  0.8 321200 14208 ?        S    22:28   0:00 /usr/sbin/apache2 -k start
www-data 32148  0.0  2.0 325968 35364 ?        S    22:28   0:00 /usr/sbin/apache2 -k start
www-data 32159  0.0  1.0 322828 18708 ?        S    22:30   0:00 /usr/sbin/apache2 -k start
al       32194  0.0  0.1  12748  2144 pts/0    S+   22:37   0:00 grep apache
root     65268  0.0  1.3 320720 22772 ?        Ss   Sep14   3:14 /usr/sbin/apache2 -k start
egfrith’s picture

If your site name is "example.com", the names of the awstats files should be awstats062015.example.com.txt; renaming the files this way should make things work. To get awstats to generate this name automatically, I think your AWStats config file would have to be called awstats.example.com.conf. See
http://www.awstats.org/docs/awstats_setup.html
for details.

If you find that renaming files works for you, I can try to make a more meaningful error message and update the docs.

btbroot’s picture

Status: Active » Closed (works as designed)

OK, this appears to be the root cause, indeed.

So, if I understand you right, the module seeks for and displays only those files in awstats data dir which follows awstatsNNNNNN.[hostname].txt naming convention, where [hostname] matches the currently requested hostname in HTTP.

Yes, I believe it is worth to be mentioned in the docs and/or in the notification messages. In my case, the web server and awstats setup has been made in a simplistic way, no virtual hosts, CNAME RR, really one awstats config for the whole web server, and the need for some mimics should be highlighted somehow.

Thanks!

egfrith’s picture

Thanks for checking. In the latest commit (which should show up here soon) I've made a somewhat more informative error message.