AWstats not updating?

NethServer Version: 7.6
Module: nethserver-awstats

I just had occasion to look at the awstats page for my repo, and noticed the stats page for that virtual host, as well as every other one I checked, shows a “last updated” of over three months ago, on 14 Dec 18. I assume I have the current versions installed:

[root@neth ~]# rpm -qa | grep awstats
nethserver-awstats-0.1.11-1.ns7.sdl.noarch
awstats-7.7-1.el7.noarch

The service appears to be enabled:

[root@neth ~]# config show awstats
awstats=configuration
    DnsLookup=disabled
    GeoIP=#
    MaxNbOfBrowsersShown=10
    MaxNbOfDomain=10
    MaxNbOfDownloadsShown=10
    MaxNbOfHostsShown=10
    MaxNbOfKeyphrasesShown=10
    MaxNbOfKeywordsShown=10
    MaxNbOfLoginShown=10
    MaxNbOfOsShown=10
    MaxNbOfPageShown=10
    MaxNbOfRefererShown=10
    MaxNbOfRobotShown=10
    MaxNbOfScreenSizesShown=5
    MinHitBrowser=1
    MinHitDomain=1
    MinHitDownloads=1
    MinHitFile=1
    MinHitHost=1
    MinHitKeyphrase=1
    MinHitKeyword=1
    MinHitLogin=1
    MinHitOs=1
    MinHitRefer=1
    MinHitRobot=1
    MinHitScreenSize=1
    Minute=5
    PdfReport=disabled
    SendReport=disabled
    Users=
    access=private
    skipPrivateIp=disabled
    status=enabled

Log files are being generated by virtualhost in /var/log/httpd/, and are current. Where else should I be looking?

Edit: If it matters, the mail statistics are being updated.

1 Like

what is the output of

exec /usr/share/awstats/tools/awstats_updateall.pl now -configdir="/etc/awstats" -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl

[root@neth ~]# exec /usr/share/awstats/tools/awstats_updateall.pl now -configdir="/etc/awstats" -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl
> 
> "
Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=autoconfig2.familybrown.org.vhost -configdir="/etc/awstats"' to update config autoconfig2.familybrown.org.vhost
Create/Update database for config "/etc/awstats/awstats.autoconfig2.familybrown.org.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.autoconfig2.familybrown.org.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.autoconfig2.familybrown.org.log'" : No such file or directory
Setup ('/etc/awstats/awstats.autoconfig2.familybrown.org.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=brownlawoffice.us.vhost -configdir="/etc/awstats"' to update config brownlawoffice.us.vhost
Create/Update database for config "/etc/awstats/awstats.brownlawoffice.us.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.brownlawoffice.us.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.brownlawoffice.us.log'" : No such file or directory
Setup ('/etc/awstats/awstats.brownlawoffice.us.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=drupal.familybrown.org.vhost -configdir="/etc/awstats"' to update config drupal.familybrown.org.vhost
Create/Update database for config "/etc/awstats/awstats.drupal.familybrown.org.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.drupal.familybrown.org.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.drupal.familybrown.org.log'" : No such file or directory
Setup ('/etc/awstats/awstats.drupal.familybrown.org.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=interociter-enterprises.com.vhost -configdir="/etc/awstats"' to update config interociter-enterprises.com.vhost
Create/Update database for config "/etc/awstats/awstats.interociter-enterprises.com.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.interociter-enterprises.com.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.interociter-enterprises.com.log'" : No such file or directory
Setup ('/etc/awstats/awstats.interociter-enterprises.com.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=kirk.club.vhost -configdir="/etc/awstats"' to update config kirk.club.vhost
Create/Update database for config "/etc/awstats/awstats.kirk.club.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.kirk.club.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.kirk.club.log'" : No such file or directory
Setup ('/etc/awstats/awstats.kirk.club.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=localhost.localdomain -configdir="/etc/awstats"' to update config localhost.localdomain
Create/Update database for config "/etc/awstats/awstats.localhost.localdomain.conf" by AWStats version 7.7 (build 20180105)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 327063)
Jumped lines in file: 327063
 Found 327063 already parsed records.
Parsed lines in file: 137
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 137 new qualified records.

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=maillog -configdir="/etc/awstats"' to update config maillog
Create/Update database for config "/etc/awstats/awstats.maillog.conf" by AWStats version 7.7 (build 20180105)
From data in log file "perl /usr/share/awstats/tools/maillogconvert.pl standard < /var/log/maillog|"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 1758
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 1757 old records,
 Found 1 new qualified records.

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=neth.familybrown.org -configdir="/etc/awstats"' to update config neth.familybrown.org
Create/Update database for config "/etc/awstats/awstats.neth.familybrown.org.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access_log'"...
Error: Couldn't open server log file "'/var/log/httpd/access_log'" : No such file or directory
Setup ('/etc/awstats/awstats.neth.familybrown.org.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=repo.familybrown.org.vhost -configdir="/etc/awstats"' to update config repo.familybrown.org.vhost
Create/Update database for config "/etc/awstats/awstats.repo.familybrown.org.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.repo.familybrown.org.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.repo.familybrown.org.log'" : No such file or directory
Setup ('/etc/awstats/awstats.repo.familybrown.org.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=www.brownlawoffice.us.vhost -configdir="/etc/awstats"' to update config www.brownlawoffice.us.vhost
Create/Update database for config "/etc/awstats/awstats.www.brownlawoffice.us.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.www.brownlawoffice.us.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.www.brownlawoffice.us.log'" : No such file or directory
Setup ('/etc/awstats/awstats.www.brownlawoffice.us.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=www.interociter-enterprises.com.vhost -configdir="/etc/awstats"' to update config www.interociter-enterprises.com.vhost
Create/Update database for config "/etc/awstats/awstats.www.interociter-enterprises.com.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.www.interociter-enterprises.com.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.www.interociter-enterprises.com.log'" : No such file or directory
Setup ('/etc/awstats/awstats.www.interociter-enterprises.com.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=www.kirk.club.vhost -configdir="/etc/awstats"' to update config www.kirk.club.vhost
Create/Update database for config "/etc/awstats/awstats.www.kirk.club.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.www.kirk.club.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.www.kirk.club.log'" : No such file or directory
Setup ('/etc/awstats/awstats.www.kirk.club.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=wx.familybrown.org.vhost -configdir="/etc/awstats"' to update config wx.familybrown.org.vhost
Create/Update database for config "/etc/awstats/awstats.wx.familybrown.org.vhost.conf" by AWStats version 7.7 (build 20180105)
From data in log file "'/var/log/httpd/access.wx.familybrown.org.log'"...
Error: Couldn't open server log file "'/var/log/httpd/access.wx.familybrown.org.log'" : No such file or directory
Setup ('/etc/awstats/awstats.wx.familybrown.org.vhost.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

The log files are there, owned by root:root with 644 permissions:

total 218M
-rw-r--r-- 1 root root    0 Sep 20  2018 access.autoconfig2.familybrown.org.log
-rw-r--r-- 1 root root 231K Mar 30 13:23 access.brownlawoffice.us.log
-rw-r--r-- 1 root root  57K Mar  3 07:44 access.brownlawoffice.us.log-20190303.gz
-rw-r--r-- 1 root root  37K Mar 10 05:58 access.brownlawoffice.us.log-20190310.gz
-rw-r--r-- 1 root root  89K Mar 17 05:16 access.brownlawoffice.us.log-20190317.gz
-rw-r--r-- 1 root root 757K Mar 24 03:46 access.brownlawoffice.us.log-20190324
-rw-r--r-- 1 root root  915 Mar 30 07:37 access.drupal.familybrown.org.log
-rw-r--r-- 1 root root  378 Mar  2 16:37 access.drupal.familybrown.org.log-20190303.gz
-rw-r--r-- 1 root root  450 Mar  9 09:12 access.drupal.familybrown.org.log-20190310.gz
-rw-r--r-- 1 root root  404 Mar 16 08:28 access.drupal.familybrown.org.log-20190317.gz
-rw-r--r-- 1 root root  72K Mar 23 18:55 access.drupal.familybrown.org.log-20190324
-rw-r--r-- 1 root root    0 Sep 20  2018 access.interociter-enterprises.com.log
-rw-r--r-- 1 root root 360K Mar 30 11:22 access.kirk.club.log
-rw-r--r-- 1 root root  18K Mar  3 07:28 access.kirk.club.log-20190303.gz
-rw-r--r-- 1 root root  34K Mar 10 03:20 access.kirk.club.log-20190310.gz
-rw-r--r-- 1 root root  88K Mar 17 06:03 access.kirk.club.log-20190317.gz
-rw-r--r-- 1 root root 312K Mar 24 03:48 access.kirk.club.log-20190324
-rw-r--r-- 1 root root  78M Mar 30 13:39 access_log
-rw-r--r-- 1 root root 4.6M Mar  3 08:29 access_log-20190303.gz
-rw-r--r-- 1 root root 5.0M Mar 10 05:58 access_log-20190310.gz
-rw-r--r-- 1 root root 5.0M Mar 17 06:10 access_log-20190317.gz
-rw-r--r-- 1 root root  82M Mar 24 03:50 access_log-20190324
-rw-r--r-- 1 root root  22K Mar 30 11:40 access.repo.familybrown.org.log
-rw-r--r-- 1 root root 1.7K Mar  2 14:30 access.repo.familybrown.org.log-20190303.gz
-rw-r--r-- 1 root root 2.1K Mar 10 05:55 access.repo.familybrown.org.log-20190310.gz
-rw-r--r-- 1 root root 1.9K Mar 17 06:08 access.repo.familybrown.org.log-20190317.gz
-rw-r--r-- 1 root root  29K Mar 24 03:42 access.repo.familybrown.org.log-20190324
-rw-r--r-- 1 root root  54K Mar 30 12:29 access.www.brownlawoffice.us.log
-rw-r--r-- 1 root root 3.7K Mar  3 05:02 access.www.brownlawoffice.us.log-20190303.gz
-rw-r--r-- 1 root root 3.7K Mar 10 05:43 access.www.brownlawoffice.us.log-20190310.gz
-rw-r--r-- 1 root root 6.9K Mar 17 04:29 access.www.brownlawoffice.us.log-20190317.gz
-rw-r--r-- 1 root root  68K Mar 24 02:37 access.www.brownlawoffice.us.log-20190324
-rw-r--r-- 1 root root    0 Sep 20  2018 access.www.interociter-enterprises.com.log
-rw-r--r-- 1 root root 115K Mar 30 12:38 access.www.kirk.club.log
-rw-r--r-- 1 root root 8.3K Mar  3 08:19 access.www.kirk.club.log-20190303.gz
-rw-r--r-- 1 root root  12K Mar 10 03:20 access.www.kirk.club.log-20190310.gz
-rw-r--r-- 1 root root 9.8K Mar 17 04:55 access.www.kirk.club.log-20190317.gz
-rw-r--r-- 1 root root 140K Mar 24 03:48 access.www.kirk.club.log-20190324
-rw-r--r-- 1 root root    0 Sep 20  2018 access.wx.familybrown.org.log
-rw-r--r-- 1 root root 161K Mar 30 13:29 error_log
-rw-r--r-- 1 root root  15K Mar  3 08:29 error_log-20190303.gz
-rw-r--r-- 1 root root  15K Mar 10 05:58 error_log-20190310.gz
-rw-r--r-- 1 root root  27K Mar 17 06:10 error_log-20190317.gz
-rw-r--r-- 1 root root 329K Mar 24 03:50 error_log-20190324
-rw-r--r-- 1 root root    0 Jan 27 09:29 ssl_access_log
-rw-r--r-- 1 root root 3.3M Jan  6 05:52 ssl_access_log-20190106.gz
-rw-r--r-- 1 root root 3.4M Jan 13 04:55 ssl_access_log-20190113.gz
-rw-r--r-- 1 root root 3.8M Jan 20 06:40 ssl_access_log-20190120.gz
-rw-r--r-- 1 root root 9.5M Jan 21 09:06 ssl_access_log-20190127
-rw-r--r-- 1 root root    0 Jan 27 09:29 ssl_error_log
-rw-r--r-- 1 root root 3.1K Jan  6 03:40 ssl_error_log-20190106.gz
-rw-r--r-- 1 root root 3.3K Jan 13 03:28 ssl_error_log-20190113.gz
-rw-r--r-- 1 root root 5.4K Jan 20 06:15 ssl_error_log-20190120.gz
-rw-r--r-- 1 root root 2.7K Jan 21 08:10 ssl_error_log-20190127
-rw-r--r-- 1 root root    0 Jan 27 09:29 ssl_request_log
-rw-r--r-- 1 root root 3.3M Jan  6 05:52 ssl_request_log-20190106.gz
-rw-r--r-- 1 root root 3.3M Jan 13 04:55 ssl_request_log-20190113.gz
-rw-r--r-- 1 root root 3.7M Jan 20 06:40 ssl_request_log-20190120.gz
-rw-r--r-- 1 root root  11M Jan 21 09:06 ssl_request_log-20190127
[root@neth httpd]# 

OTOH, the httpd directory itself is owned by root:root with 700 permissions–could that be the problem?

1 Like

I tried myself to change the permissions but it doesn’t seem to fix the issue

sorry …I made a bug, in the /etc/awstats/virtualhostName.conf

replace the ' by " for the path to the log file

I will commit to fix it, sorry again

released

1 Like

Yep, this morning’s update seems to have fixed it. Thanks!

I believe there is another configuration gap:
The log files are correctly evaluated in the monthly aggregation. But as soon as you switch to the Daily or Hourly view, you get the error message: “Never updated yet”.

Best regards, Marko

1 Like

I do not understand, does it comes from the AWSTATS UI, try to take english screenshot maybe with more context also

EDIT: it seems I can reproduce

I wonder if it is not an internal bug of awstats, if you look on the upper left you can use month, days, hours view and they are updated

Screenshot (32)

or maybe we have to complete one day :expressionless:

1 Like

from AWStats Documentation - FAQs

FAQ-COM600 : HOW CAN I COMPILE AND BUILD STATISTICS ON A DAILY BASIS ONLY ?
PROBLEM:
How can I compile and build statistics on a daily basis. I mean i want to have a full report with all charts with data for a particular day only and want one report for each day of month.
SOLUTION:
If you use version 6.5 or higher:
To build statistics:
What you can do is rerun the update process by adding the parameter -databasebreak=hour or -databasebreak=day. Providing no option is similar than using -databasebreak=month, the default and old behaviour of AWStats.
Using this hidden option will ask AWStats to build a different database file for each break entity, this means that several reports are done for each hour or day, depending on option used.
To read a report:
Add same option -databasebreak=hour or -databasebreak=day with -output option when AWStats report is staticaly built from command line, or add &databasebreak=hour or &databasebreak=day if AWStats is called as a CGI. Also, complete options month and year used to choose month and year of report with other option day (when databasebreak option is ‘day’ or ‘hour’) and hour (only when databasebreak is ‘hour’)
So use -day=XX and/or -hour=XX when AWStats is run from command line. Use &day=XX and/or &hour=XX if AWStats is called as a CGI.
This feature is recent so may have results not completely reliable, that’s why it is not yet fully documented.
If you use version 6.4 or older:
This is an non documented and not supported trick, as this is not the standard way of working:
First, run the update process at midnight (or on a log file that was rotated at midnight so that it contains only data for this particular day (you can choose another hour in night if you want to have days that “start” at an different hour).
Once the update process has been ran, MOVE (and not copy) the history file built by AWStats. For example on Unix like systems:
mv mydirdata/awstatsMMYYYY.mydomain.txt mydirdate/awstatsDDMMYYYY.mydomain.txt
Note that the name has been changed by adding the day. Repeat this each day after the update process.
With this you will have one history file for each day. You can then see full stats for a particular day by adding the non documented parameter -day=DD on command line (with others like -month=MM and -year=YYYY). If ran from a browser you can also add &day=DD on URL.
However, if you have full day by day statistics, you don’t have anymore statistics for full month, except if you create a second config file that whose history files would not be moved.

I have several concerns, not sure it can be enabled for all webhost/maillog, it can create a lot of log :expressionless:
It seems not a quite common setting

1 Like

That presents the needed statistics.
This puts the error in the “cosmetics” category and may not be worth the effort.

Not yet stated if I make the dropdown hidden or I try to fix it honestly, nonetheless I fixed a bug with the maillog that you cannot choose an annual view in the web browser…

1 Like

I once again wanted to take a look at the stats and notice that I only get stats from 2023 displayed and can’t select other years in the dropdown.

How can I change this behavior?

Sincerely, Marko