From owner-freebsd-isp Thu Aug 2 4:19:16 2001 Delivered-To: freebsd-isp@freebsd.org Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by hub.freebsd.org (Postfix) with ESMTP id 05A2B37B403 for ; Thu, 2 Aug 2001 04:19:12 -0700 (PDT) (envelope-from Alexander@leidinger.net) Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout0.freenet.de with esmtp (Exim 3.32 #1) id 15SGVO-0007vn-00; Thu, 02 Aug 2001 13:19:06 +0200 Received: from b8540.pppool.de ([213.7.133.64] helo=Magelan.Leidinger.net) by mx2.freenet.de with esmtp (Exim 3.32 #1) id 15SGVL-0001WD-00; Thu, 02 Aug 2001 13:19:05 +0200 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.11.5/8.11.5) with ESMTP id f729pkg37264; Thu, 2 Aug 2001 11:51:49 +0200 (CEST) (envelope-from netchild@Leidinger.net) Message-Id: <200108020951.f729pkg37264@Magelan.Leidinger.net> Date: Thu, 2 Aug 2001 11:51:44 +0200 (CEST) From: Alexander Leidinger Subject: Re: Data traffic monitoring for virtualhosts To: eric@monkey-online.net Cc: freebsd-isp@FreeBSD.ORG In-Reply-To: <3B6880F3.E71EEE47@monkey-online.net> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2 Aug, Eric Veraart wrote: > I think this is a FAQ, but I can't find it in the archives; which packet > would you recommend to log data traffic for virtual hosts on Apache? > I thought Webalizer was ok, but I heard some negative reports about it > today. Then I stumbled upon Apache::Traffic > (http://www.perldoc.com/cpan/Apache/Traffic.html), which seems to be ok. > > Anyone got a recommendation? Just have a look at the output of those programs and choose the one you like the most. Other programs which also do loganalyzing are analog and modlogan (http://www.kneschke.de/projekte/modlogan/). For the later one you can find a port at http://www.leidinger.net/FreeBSD/. And an excerpt of the manual if you collect the logdata for every vhost in one file: ---snip--- 1. logfile splitter =================== plugin: processor/web option: splitby if you want to split one input stream into different output stream, you need a logfile splitter. you can use an external script as a preprocessor or use the splitter-support of the web processor plugin. input stream (input plugin) | +-- ... ---+--- ... ---+ (processor plugin) | | | | | | output streams (output plugins) to enable this feature add a splitby definition to the processor_web section of your config-file. a splitby definition is the following string: splitby=,"", where is: srvhost - for the host which served the request srvport - for the port where the host listened at requser - for the authenticated user requrl - for the requested url reqhost - for the requesting host refurl - for the referring url default - 'joker' which matches everything. is a regular expression which has to successfully been matched and a name to group the splitted records again. is also used as the name of the subdirectory where the reports are placed. if you specify multiple splitby definitions they a checked from the first to last. if one check is successfull the generated name is used as . NOTE: the splitter has to return a name and it's your job to make sure that a name is available - by using a always matching definition e.g. splitby=srvhost,"(.*)",$1 - by specifing a 'default' definition. Examples 1: ----------- let's assume that we have the following directory structure: /users/~j.kneschke/index.html /users/~project.modlogan/index.html the definition -- splitby=requrl,"^/users/~(.*?)/.*$",host_$1 -- will divide the records according to the string between the '~' and the '/'. the string will be taken and added the name. /users/~j.kneschke/index.html -> host_j.kneschke /users/~project.modlogan/index.html -> host_project.modlogan directories will be created (if it doesn't exist) in the directory which you specifiy with global:outputdir with the name host_j.kneschke and host_project.modlogan. each directory contains the reports for the respective splitted logs. ---snip--- Bye, Alexander. -- Press every key to continue. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message