1 (edited by andrew88 2017-07-19 07:28:23)

Topic: awstats not updating ever since install

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: ubuntu 16.04 lts
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):apache
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,

Trying to check statistics with awstats tonight and found out that it is not updating.  error message at the top of the web page says "Never updated (See 'Build/Update' on awstats_setup.html page)",  Reading through the forum seems to indicate an issue with the cron job, which are listed below.  All other cron jobs are running without issue.  I could not find anything log file wise specific to the cronjob not running.

# iRedMail: update Awstats statistics for web hourly
1   */1   *   *   *   /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=web >/dev/null

# iRedMail: update Awstats statistics for smtp hourly
1   */1   *   *   *   /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=smtp >/dev/null

Also as an aside, it seems to be only setup for 1 of my mail domains, how would i get it to recognize all of my domains?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: awstats not updating ever since install

Any error if you run these 2 commands manually on console? What's the full output?

3 (edited by andrew88 2017-07-19 18:41:32)

Re: awstats not updating ever since install

running /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=web >/dev/null provides no output in the terminal screen, but also no errors.

running /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=smtp >/dev/null also provides no output or errors on the terminal.

Looking at the awstats webpage, there is also no changes being shown there.

4

Re: awstats not updating ever since install

Assuming awstats was installed correctly, make sure that the log file specified in /etc/awstats/awstats.web.conf is pointing to your actual log file. Default for apache is /var/log/httpd/access_log. If that's empty, then check /etc/httpd/conf.d for the website you want to be tracking stats for and find where the information is actually being logged.

5

Re: awstats not updating ever since install

the logfile specified in /etc/awstats/awstats.web.conf is pointing to /var/log/apache2/access.log

and the logfile specified in /etc/awstats/awstats.smtp.conf is point at LogFile="perl /usr/share/doc/awstats/examples/maillogconvert.pl standard < /var/log/mail.log |"

both of these log files exist.  apache access log is owned by root /adm with rw -r permissions and the mail log is owned by syslog / adm with rw -r permissions

there is also an awstats.conf.2017.05.30.15.20.59 file that appears to be configured for reading apache logs

6

Re: awstats not updating ever since install

What's the output of commands below?

/usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=web
/usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=smtp

7

Re: awstats not updating ever since install

root@mail:~# /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=web
Create/Update database for config "/etc/awstats/awstats.web.conf" by AWStats version 7.4 (build 20150714)
From data in log file "/var/log/apache2/access.log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 504)
Jumped lines in file: 504
Found 504 already parsed records.
Parsed lines in file: 108
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 108 new qualified records.

root@mail:~# /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=smtp
Create/Update database for config "/etc/awstats/awstats.smtp.conf" by AWStats version 7.4 (build 20150714)
From data in log file "perl /usr/share/doc/awstats/examples/maillogconvert.pl standard < /var/log/mail.log |"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Jumped lines in file: 0
Parsed lines in file: 371
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 371 old records,
Found 0 new qualified records.

I cant tell if that did anything or not though, refreshing the web page (f5 key) didn't show any changes

8

Re: awstats not updating ever since install

It shows correctly parsed xxx lines. no error at all.

9

Re: awstats not updating ever since install

thanks, appearently i also had the wrong url for it as well, going to https://server ip/awstats/awstats.pl?config=smtp, now shows everything properly.

Thanks