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=16)
-   -   missing webalizer stats (http://www.howtoforge.com/forums/showthread.php?t=25340)

bolero 22nd July 2008 13:26

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?

till 22nd July 2008 13:29

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.

bolero 22nd July 2008 13:43

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?

till 22nd July 2008 13:49

Ok, either you recompile webalizer so that it is located in /usr/bin/webalizer or you symlink it.

bolero 22nd July 2008 13:53

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?

falko 23rd July 2008 18:55

Yes, you can run that cron job manually. If it doesn't display any errors, everything should be fine.

bolero 24th July 2008 20:04

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.)

bolero 24th July 2008 20:14

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?

till 24th July 2008 20:15

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 ?

till 24th July 2008 20:18

Quote:

Originally Posted by bolero (Post 137617)
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.


All times are GMT +2. The time now is 16:07.

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