[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Re: Webalizer, logrotation etc.
- Subject: [cobalt-users] Re: Webalizer, logrotation etc.
- From: "Stephan P. Muecke" <smuecke@xxxxxxxxxxxxx>
- Date: Sat Oct 21 09:09:01 2000
- Organization: net:impaqt
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hello,
I´ve installed the webalizer.pkg and everything seemed to run fine. After I
made the changes mentioned below (webalizer_all.pl, webalizer_sites.pl, aso)
Webalizer stopped working, the /allstats directory is still empty (although
the script should have been executed twice since I made the changes) and
under /stats I only get the old stats.
I checked the file permissions to 777 (webalizer_all.pl and
webalizer_sites.pl), removed the --> in your code for the
/etc/webalizer.conf", but its still not running.
Any idea why its not running any more? And by the way, do you know why I
only get "Country unknown" for every visitor? Or can you tell me, how to
change the language of Webalizer?
I would be very happy to hear from you.
Best regards,
Steve
stefan.biebl@xxxxxx stefan.biebl@xxxxxx
Thu, 20 Jul 2000 09:56:42 +0200:
I installed Webalizer two days ago and it works great. But I have done a few
changes:
1. Installed webalizer.pkg
2. Moved webalizer.pl from /etc/cron.daily to /usr/local/bin, renaming it to
webalizer_sites.pl
3. Created created the script /usr/local/bin/webalizer_all.pl:
Webalizer_all.pl is a script which runs webalizer on /var/log/httpd/access
for
complete web server statistics. Target is (existing)
/home/sites/home/web/allstats. This report is for the curious server admin
...
;-)
#!/usr/bin/perl
my $messages;
$messages .= `webalizer -n "MyRaq" -q -T -o /home/sites/home/web/allstats
/var/log/httpd/access`;
# Debugging printer, uncomment to use.
#print $messages;
exit 0;
4. Configured Webalizer to work incrementally:
Change "#Incremental no" in /etc/webalizer.conf to "Incremental yes" or
insert
the -p flag in both scripts.
5. Added (-->) both scripts in /etc/logrotate.d/apache:
/var/log/httpd/access {
prerotate
--> /usr/local/bin/webalizer_all.pl
/usr/local/sbin/split_logs web < /var/log/httpd/access
--> /usr/local/bin/webalizer_sites.pl
endscript
missingok
postrotate
/bin/kill -USR1 `cat /var/run/httpd.pid`
endscript
daily
}
...
Therefore the server analyzes the total access log using webalizer_all.pl,
splits this log using split_logs, analyzes all site logs using
webalizer_sites.pl and then performs logrotation, if necessary. No part of
the
logs should get lost by logrotation (or I am totally wrong ...).
Btw, logrotation happened on two of my sites this night, statistics still
are
ok.
Sorry for my bad englisch ;-)
Best wishes,
Stefan