Webalizer statistics are not updated on migrated domains

Created:

2016-11-16 12:39:56 UTC

Modified:

2017-04-24 11:16:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Webalizer statistics are not updated on migrated domains

Applicable to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Webalizer statistics is not updated for the domains that were migrated/transferred from another server.

Cause

It may occur if the source server's version of Webalizer is newer than the one on destination server.

Resolution

I. If you do not need to save the previous statistics history please delete webalizer.hist and webalizer.current files and run statistics recalculation:

    # rm /var/www/vhosts/system/example.com/statistics/webstat/webalizer.current
# rm /var/www/vhosts/system/example.com/statistics/webstat/webalizer.hist
# /usr/local/psa/admin/bin/web_statistic_executor --calculate-domain=example.com

II. If the previous history is needed follow the steps below:

  1. Backup webstat folder

    cp -R /var/www/vhosts/system/example.com/statistics/webstat /var/www/vhosts/system/example.com/statistics/webstat.back
  2. Edit the Webalizer version in the head of the file /var/www/vhosts/system/example.com/statistics/webstat/webalizer.hist :

    # Webalizer V2.01-10 History Data
    ...
  3. Revert the data in /var/www/vhosts/system/example.com/statistics/webstat/webalizer.hist , it needs to be sorted by date like:

        10 2012 5142 4594 412 90664 1 31 2109 826
    11 2012 10182 9623 453 141425 1 30 6262 825
    12 2012 4388 4011 437 75129 1 31 2189 921
    1 2013 14560 14215 481 143021 1 31 11739 1176
    2 2013 5389 4934 394 80367 1 28 3029 750
    3 2013 6096 5815 421 93491 1 31 3494 1005
    4 2013 9014 8539 452 113840 1 30 5974 1175
    5 2013 4668 4368 388 91136 1 31 1832 773
    6 2013 17466 16871 585 153140 1 30 14405 1174
    7 2013 7265 7207 341 43674 1 6 7001 545
  4. Set the date in the first and the second strings of the /var/www/vhosts/system/example.com/statistics/webstat/webalizer.current file to the date from the first record of /var/www/vhosts/system/example.com/statistics/logs/access_log file (if it is empty see /var/www/vhosts/system/example.com/statistics/logs/access_log.webstat ). It is also required to change the version in this file.

    For example:

    cat /var/www/vhosts/system/example.com/statistics/logs/access_log | head -n1
    100.10.10.10- - [28/Sep/2013:03:26:52 +0200] "GET /eng/index2.php?seccion=inicio HTTP/1.0" 500 4253 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"

    before modifying:

    cat /var/www/vhosts/system/example.com/statistics/webstat/webalizer.current | head -n2
    # Webalizer V2.21-02 Incremental Data - 06/22/2013 03:47:00
    2013 6 22 3 47 0

    after modifying:

    cat /var/www/vhosts/system/example.com/statistics/webstat/webalizer.current | head -n2
    # Webalizer V2.01-10 Incremental Data - 09/28/2013 03:26:52
    2013 9 28 3 26 52
  5. Run the following command to calculate the statistics

    # /usr/local/psa/admin/bin/web_statistic_executor --calculate-domain=example.com
Have more questions? Submit a request
Please sign in to leave a comment.