I was reading this post about AWStats in a multi server environment and have a follow up question https://forum.howtoforge.com/threads/solved-awstats-issue.77699/#post-367784 What about the stats? As it's part of the shared storage. Will stats only be build by the primary webserver and not by the mirror webserver? Or will the mirror webserver also be building stats? If so, won't that double up the stats? I'm thinking of switching to GoAccess in the new environment I'm building. Do I need to take anythings else into consideration besides the obvious?
Both will build stats. But if the access.log file is synchronized and used by both servers, it should serve the same stats... Using a simple tool as AWStats for a master-master mirrored webserver config does not make sense to me though
Thanks for the clarification. For me it doesn't make sense to have per webserver website stats for the same site. I would want to have total stats, one page to see how the website is doing. Webserver statistics will be monitored by Cacti.
For some unknown reason stats aren't propagated. I can't find any reason why in logs. Nginx logs are rotated and awstats files are renewed every night but all counters remain to be zero and Last Update status keeps saying "Never updated (See 'Build/Update' on awstats_setup.html page)". Code: php /usr/local/ispconfig/server/cron_debug.php --cronjob=150-awstats.inc.php Runs without any errors.
Hmm, not easy to say what the reason is. Do you have some PHP knowledge? If yes, I would recommend looking at the code to get exact awstats command that the plugin is running and then run that command manually to see if you get any errors on the shell.
@till My PHP knowledge is fairly basic. For the most part I undestand the code so I generally can follow what a script is doing and even do some tweaking if desired. Dissecting the awstats command from this script to run it manually is a whole other story Or maybe I'm looking in the wrong file? Code: /usr/local/ispconfig/server/lib/classes/cron.d/150-awstats.inc.php
Yes, that's the file. Try this: add the following line right after line 172 (the exec command): Code: echo $command ."\n"; Then run: php /usr/local/ispconfig/server/cron_debug.php --cronjob=150-awstats.inc.php and you should get a list of all awstats commands that were run.
That gives me: Code: /usr/share/awstats/tools/awstats_buildstaticpages.pl -month='11' -year='2023' -update -config='<domain>' -dir='/var/www/clients/client3/web1/web/stats' -awstatsprog='/usr/lib/cgi-bin/awstats.pl' Output manually running that command: Code: Launch update process : "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -update -configdir= Build main page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output Build alldomains page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=alldomains Build allhosts page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=allhosts Build lasthosts page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=lasthosts Build unknownip page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=unknownip Build allrobots page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=allrobots Build lastrobots page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=lastrobots Build session page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=session Build urldetail page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=urldetail Build urlentry page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=urlentry Build urlexit page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=urlexit Build osdetail page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=osdetail Build unknownos page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=unknownos Build browserdetail page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=browserdetail Build unknownbrowser page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=unknownbrowser Build downloads page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=downloads Build refererse page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=refererse Build refererpages page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=refererpages Build keyphrases page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=keyphrases Build keywords page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=keywords Build errors400 page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=errors400 Build errors403 page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=errors403 Build errors404 page: "/usr/lib/cgi-bin/awstats.pl" -config=<domain> -staticlinks -month=11 -year=2023 -output=errors404 23 files built. Main HTML page is 'awstats.<domain>.html'. <domain> is placeholder for the correct domainname. Again all files in stats folder are renewed (timestamped when command ran) but all counters remain to be zero and Last Update status keeps saying "Never updated (See 'Build/Update' on awstats_setup.html page)". I notice at line 1 -configdir= is empty. Is that correct?
That should be fine as the config files are in the global config dir from awstats, so this option does not need to be set. Check the config file of the domain, must be something like /etc/awstats/... if it is there and if it contains the right path to the log file of that site. if that's ok, check the log file to ensure it really contains recent data.
It's there and all seems fine. Comparable to config on an older working server. You mean yesterday-access.log in /var/www/<domain>/log/ otherwise known as /var/log/ispconfig/httpd/<domain>/? Today it's empty (which is correct) but past days it did contain valid data.
Not really. Maybe you can try to run the command with --configdir=..... set and point it to the directory where the site config files are to see if it makes a difference.
Absolutely no clue why but this night for the first time stats where propagated! If've done nothing to any config on the server for days. Only thing I've done yesterday is resetting ufw config and reapplying open ports from System >> Firewall in ISPConfig. Can't think if any reason why that could be of influence.
Rectification, it's NOT solved. Apparently stats started a day earlier, the night from november 10th-11th. And since then stats are added to november 10th. Makes me think it has something to do with the content of access.log not being interpreted properly. Any thoughts?