Cron AWSTATS missing some logfiles

  • Hi Laurent...
    Today i got an email from root, that the cronjob for awstats.pl is missing some logfiles.

    Quote

    Running '"/usr/lib/cgi-bin/awstats.pl" -update -config=aliasdomain.de -configdir="/etc/awstats"' to update config aliasdomain.de Create/Update database for config "/etc/awstats/awstats.aliasdomain.de.conf" by AWStats version 7.0 (build 1.971) From data in log file "/var/log/apache2/aliasdomain.de-combined.log"...
    Error: Couldn't open server log file "/var/log/apache2/aliasdomain.de-combined.log" : Datei oder Verzeichnis nicht gefunden Setup ('/etc/awstats/awstats.aliasdomain.de.conf' file, web server or permissions) may be wrong.
    Check config file, permissions and AWStats documentation (in 'docs' directory).


    Thats's correct the logfiles do not exists.
    The logifiles, which are missing, are logfiles from aliasdomain.
    The aliasdomains are forwarded to an another domain.
    Sascha


    Edit: I'm using the git master before the latest bug fix release

    Edited once, last by Nuxwin ().


  • Helllo


    When creating a domain (whatever its type), Apache log files are never created for it as long that the site is not reached. The i-MSCP apache logger create the log files at runtime, when the site is reached the first time. In your case, you got that email because when the Awstats cron task has been run, the log file for your domain alias was not created yet. This problem can occur for any entity.


    Well here, the simplest way to fix this is to create empty log file on entity creation. I'll also check if it's not possible to tell Awstats to ignore any entity for which not log file exists.


    Now I see another problem: I don't think that we must collect statistics data through Awstats for an entity being redirected. Statistics should be available for the domain on which the entity is redirected.



    Thanks you for you report.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().

  • Edit:


    TheCry Can you please post us the content of your /etc/cron.d/imscp cron file? I ask for this because normally, any output should be redirected on /dev/null to disable cron mail.


    Thanks

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi Laurent..
    No problem

    Code
    1. # Quota@daily root umask 027; /var/www/imscp/engine/quota/imscp-dsk-quota &>/var/log/imscp/imscp-dsk-quota.log# Traffic0,30 * * * * root umask 027; /var/www/imscp/engine/traffic/imscp-srv-traff &>/var/log/imscp/imscp-srv-traff.log0,30 * * * * root umask 027; /var/www/imscp/engine/traffic/imscp-vrl-traff &>/var/log/imscp/imscp-vrl-traff.log# customer logs@daily root umask 027; /var/www/imscp/engine/tools/imscp-httpd-logs-mngr &>/var/log/imscp/imscp-httpd-logs-mngr.log# Backup for all the customers' data depending of the domain properties@daily root umask 027; /var/www/imscp/engine/backup/imscp-backup-all yes &>/var/log/imscp/imscp-backup-all-mngr.log# Backup for i-MSCP database and all /etc/imscp/* configuration files@daily root umask 027; /var/www/imscp/engine/backup/imscp-backup-imscp noreport &>/var/log/imscp/imscp-backup-imscp-mngr.log# Remove config backups older than seven days@daily root find /etc/imscp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs -r /bin/rm# Remove Daemon Logs older than 14 days (except .gz files)@daily root find /var/log/imscp/* -maxdepth 1 -type f -mtime +14 -print | egrep '.*\.gz$' | xargs -r /bin/rm# AWStats15 */6 * * * root /var/www/imscp/engine/awstats/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl >/dev/null 2>&1# Rootkit Hunter@weekly root /usr/bin/rkhunter --cronjob --createlogfile /var/log/rkhunter.log.root --display-logfile 1>/var/log/rkhunter.log 2>/dev/null# Chkrootkit@weekly root /usr/sbin/chkrootkit 1>/var/log/chkrootkit.log 2>&1# Look for and purge old sessions every 30 minutes0,30 * * * * root /var/www/imscp/engine/tools/imscp-del-tmp >/dev/null 2>&1# Delete old apache logfiles weekly@weekly root /var/www/imscp/engine/tools/imscp-del-logs >/dev/null 2>&1# [{DOMAIN_NAME}]:{CRONJOB_ID} custom task START.# [{DOMAIN_NAME}]:{CRONJOB_ID} custom task END.# [{TASKID}] custom task START.# [{TASKID}] custom task END.


    I got this error message per email..
    In my /etc/aliases, i added my emailaddress to the root

    Code
    1. root: [email protected]

  • Re ;


    I've added my mail too and then run newaliases... I'll try.


    Thanks

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206