HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Webalizer statistics only creates a daily stats (http://www.howtoforge.com/forums/showthread.php?t=34709)

filipealvarez 8th May 2009 13:42

Webalizer statistics only creates a daily stats
 
Hi there, I found one problem in the Ispconfig3/Webalizer on Ubuntu 8.04,
the webalizer only creates a daily stat (not acumulate the days).

Example: www.temautos.com.br/stats

How to fix it?
Is something in /etc/webalizer/webalizer.conf or with the logs?

till 8th May 2009 18:07

you have to enable the partial log feature in webalizer.conf

filipealvarez 8th May 2009 19:32

Thanks Till, add 'Incremental Yes' in webalizer.conf solves my problem.

martin1977 17th May 2009 12:58

Is there a way to "re-read" those stats that were forgot before enabling this option?

Best regards,
Martin

till 17th May 2009 13:07

No, not as far as I know as the log that is used to create the statistics is deleted after some days.

martin1977 18th May 2009 09:17

OK, I found a way to feed webalizer with the "forgotten" statistics.

The following will go through the access log files for each domain and gather the information in the todays log file. The old logs are deleted (as the information is now stored in the actual log) to prevent running the command twice and dubblicating data by mistake.

Code:

find /var/log/ispconfig/httpd -name "*.gz" |while read g; do gzip -fd $g; done && find /var/log/ispconfig/httpd/ -maxdepth 1 -mindepth 1 -type d | while read i ; do rm $i/access.log && cat $i/*-access.log >> $i/access.log && rm $i/*-access.log && mv $i/access.log  $i/`date +%Y%m%d`-access.log && ln -s $i/`date +%Y%m%d`-access.log $i/access.log; done
Next time webalizer is running statistics it will consider all available information from the past days. Thereafter everything will run as usual.
( Do not forget to change the option "Incremental yes" in /etc/webalizer/webalizer.conf).

Best regards,
Martin


All times are GMT +2. The time now is 12:23.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.