
22nd July 2008, 13:26
|
|
Senior Member
|
|
Join Date: Apr 2008
Posts: 112
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
missing webalizer stats
I think I have hosed the creation of webalizer stats on my new setups somehow. I have a test setup where stats are getting created in a stats subdirectory for the webids and in a usage directory for the main hostname. e.g. it seems to work. Because webalizer stats where in English (I need them in German) I followed the directions elsewhere in this forum and compiled a new webalizer. As version 2.20 had just come out I used that. It seems to work. At least I get an answer that makes sense when I just run "webalizer".
However, it's not getting used by ISPConfig although a "which webalizer" tells me the system wants to use 2.20 in /usr/local/bin and not 2.10 in /usr/bin. According to the forum post a newly compiled one should just work "if it is in the path". webalizer.php uses "which webalizer" itself. But if the path for the command is different it would not find it. From where does ISPConfig get the path? A cron script? There is no cron script for it in cron.daily, although it runs at 4:00 a.m. which looks very much like cron.daily. There's only 00webalizer which can't be it.
I cloned that setup and uninstalled the webalizer rpm, so that only that new webalizer binary is there. On that setup I don't get any stats at all, not even the stats directories got created. I assume there's either the cron/schedule file missing or it doesn't find the binary.
How can I troubleshoot this?
|

22nd July 2008, 13:29
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
You compiled your webalizer with the wrong path. You should have used the same path then the webalizer that was already installed on your system.
To correct this without recompiling you should rename the webalizer binray from your system, so the which cammand finds your newly compiled version.
|

22nd July 2008, 13:43
|
|
Senior Member
|
|
Join Date: Apr 2008
Posts: 112
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Thanks for the very quick answer. I just compiled it with default target path, that's apparently /usr/local. Anyway, that can't be it. As I explained, I cloned the VM and removed the webalizer rpm. There is no /usr/bin/webalizer anymore, only /usr/local/bin/webalizer.
As I wrote, either the scheduled creation got accidently hosed, so that webalizer.php (which seems to be responsible for stats creation) doesn't run at all or the which run from it can't find the webalizer in the /usr/local/path. At least I see only these two options. I will try an ln -s to overcome the which problem.
How can I check this? What actually triggers the nightly webalizer runs at 4 am? And can I mimick that now so that I can test creating stats at any time?
|

22nd July 2008, 13:49
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
Ok, either you recompile webalizer so that it is located in /usr/bin/webalizer or you symlink it.
|

22nd July 2008, 13:53
|
|
Senior Member
|
|
Join Date: Apr 2008
Posts: 112
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Yes, I already did the latter a few minutes ago. But is there no way to test it *now*? I just checked the individual crontabs and there is one that runs webalizer.php. So I now know how this is triggered. Can I just run it now or would this spoil something?
|

23rd July 2008, 18:55
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Yes, you can run that cron job manually. If it doesn't display any errors, everything should be fine.
|

24th July 2008, 20:04
|
|
Senior Member
|
|
Join Date: Apr 2008
Posts: 112
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Ok, it seems to be running at night, but no output. I ran it now from the shell and here's sample output for one web:
Code:
Fehler: Kann die Protokolldatei nicht ¦ffnen. /var/www/web1/log/web.log (symlink)
Erstelle Statistik Verzeichnis: /var/www/web1/web/stats
Domain: example.de
Log Dir: /var/www/web1/log
Max Log size: 157286400
Current Log size: 23776
Code:
l /var/www/web1/log/web.log
lrwxrwxrwx 1 web1admin web1 47 Jul 22 23:38 /var/www/web1/log/web.log -> /var/www/www.example.de/log/2008/07/web.log
l /var/www/www.example.de/log/2008/07/web.log -rw-r--r-- 1 web1admin web1 21227 Jul 24 00:30 /var/www/www.example.de/log/2008/07/web.log
l /var/www/web1/web/stats
total 12
drwxr-xr-x 2 web1admin web1 4096 Jul 24 19:40 .
drwxrwxr-x 5 web1admin web1 4096 Jul 24 19:40 ..
-rw-rw-r-- 1 web1admin web1 124 Jul 24 19:40 .htaccess
Log has only hits from yesterday, I don't know if that should generate stats.
But the errors don't look good. First it can't find the log file, but then it knows the size (not exactly correct, though)?
What's going on here? On another setup I see that it happens for all logs that are not empty! Could it be the wrong log format? Which log format do we need? Did I overlook something in your setup guide for CentOS 5? (I don't remember anything about log formats.)
|

24th July 2008, 20:14
|
|
Senior Member
|
|
Join Date: Apr 2008
Posts: 112
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Ok, getting nearer. Changing to the default English webalizer produces stats. That is webalizer 2.01. Either webalizer 2.02 doesn't like the log format in general or it doesn't like the log format definition it gets from webalizer.php (I assume the command includes expected logfile format?) or I need to compile it with some specific option. Ideas?
|

24th July 2008, 20:15
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
Quote:
|
Log has only hits from yesterday, I don't know if that should generate stats.
|
The log file is processed once a night. so thats ok. and the log size is fine too. I guess that your webalizer binary does not generate the correct statistics, as the ouput from the manual run of the webalizer.php is fine.
Have you run your webalizer binary manually and does it produce correct stats for the file /var/www/web1/log/web.log ?
|

24th July 2008, 20:18
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
Quote:
Originally Posted by bolero
Ok, getting nearer. Changing to the default English webalizer produces stats. That is webalizer 2.01. Either webalizer 2.02 doesn't like the log format in general or it doesn't like the log format definition it gets from webalizer.php (I assume the command includes expected logfile format?) or I need to compile it with some specific option. Ideas?
|
Have a look inside the webalizer.php file for the options that ispconfig uses. the options which are used there work for all webalizer packages for all supported linux distributions, so I guess you might have used wrong compile options for your custom webalizer binary.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 03:46.
|
Recent comments
1 day 18 hours ago
2 days 3 hours ago
2 days 6 hours ago
2 days 7 hours ago
2 days 9 hours ago
2 days 10 hours ago
2 days 12 hours ago
2 days 13 hours ago
3 days 5 hours ago
3 days 6 hours ago