1.3/2.0/ispman.vlogger
Andreas John <[email protected]> Thu, 09 Jun 2005 03:19:15 +0200
| Newsgroups | gmane.comp.isp.ispman.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Joerh,
hello All!
> First of all, I recommend *not* using the dev_1_3-bigcleanup branch from
> cvs (which you obviously do, when using rev 1.25.2.1 ;)
> That branch was a start to do code cleanup, which eventually led me to
> do a fresh code rewrite for an all new 2.0 version.
Go on ;) What I could contribute is a huge Makefile that installs ISPMAN
on a fresh debian system incl. getting all needed packages. ("wrapper
makefile"). It brings the whole ISPMAN on Debian to live. Installation
time approx. 10 Mins + time get fetch packages. It s'n' replaces all
relevant configs and some more.
> So, if you want something quite stable, stick to the main trunk (HEAD).
We always use untested and buggy software :) ( German-speakers may be
aware of our website http://nichts-funktioniert-hier.de )
Which 1.3 (!) brach would you recommend for those who want to libe
bleeding edge? I still looking for the ldap/gid-names support .... to
give the numerical group readable names.
> Your change looks pretty reasonable, and was just commited to CVS (Thanks!).
> BTW: ispman.makelogs was quite unmaintained in the past, since not many
> people use their own log/stat mechanisms.
I know. Sad. I tried to use Wim's awstats system, but since I am using
suexec and suphp, this cgi solution does not work without terrible
things like changing /etc/sudoers ...
So folks, be informed that I am currently implementing a logging + stats
solution. The frist step is already done. It's called "ispman.vlogger"
and based on shade's "vlogger".
What does it do? Handles a piped logfile from a webserver, splitting it
into it's host components, and rotates the files.
Configuration: Basically you put two lines in your main httpd.conf:
----
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" vlogger
CustomLog \"|/opt/ispman/bin/ispman.vlogger\" vlogger"
----
And remove the CustomLog line from ispman's vhosts.conf.template.
Without that line in <VirtualHost> Apache will log into it's default
log, which is defined as a pipe to ispman.vlogger. The LogFormat makes
Apache add the vhost as first column. ispman.vlogger looks up to which
ispman vhost this belongs to via LDAP queries and writes the line to the
corresponding logfile. (To be precise I build up a hash for vhosts,
website aliases, uid und gid once at the start of the logger only - for
performance reasons) ispman.vlogger opens 100 filehandles by default
(managed in a hash like the original vlogger) and kicks the oldest one
if it needs more than 100. The access log is rotated automagically by
ispman.vlogger (no more logrotate ....). You can also make it set uid
and gid, I'll adding a umask option soon.
The ispman.vlogger has several options. The most important ones.
-t template. Like "".%Y%m%d.access".+
The Logfile will look like: www.example.com.20050621.access
-s Symlink Maintain local Symlink:
www.example.com.access -> www.example.com.%Y%m%d.access
-m Migration mode. If it a file like www.example.com.access is found in
the logs dir, it will be moved to www.example.com.%Y%m%d.access, i.e. if
you logged "old style", the logfile will be saved (but not splitted)
-u uid setter. uid taken from ldap vhost record.
-g gid setter. gid taken from ldap vhost record.
The defaults are set reasonable.
The script is running on my smallest production machine, without any
troubles. I will give it to everyone interested and make it publically
available after some further days of testing and writing some words into
README ....
The next step is to write a script that creates awstats HTML output from
the logfiles generated, i.e. creating
/etc/awstats/awstats.www.example.conf automagically from LDAP entries
(Aliases!) and running awstats ...
Uh, this was much. Maybe too much.
Feedback welcome! If you want to test or need features, it now time to
tell ...
rgds,
Andreas
--
Andreas John
net-lab GmbH
Luisenstrasse 30b
63067 Offenbach
Tel: +49 69 85700331
http://www.net-lab.net
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20