Simon wrote:
Hi There, We are a wholesale hosting provider. We run debian sarge for all our servers and offer PHP, ASP hosting, mail and domain names to our customers. These services are spread across a variety of servers 1 for PHP, 1 for ASP (using SunONE ASP), a hosting MySQL box, MySQL box for the mail store, as well as seperate POP/IMAP/SMTP servers. I would like to create a "Logging" server, that would log all stats from various services... - hit stats from the web server (apache 2) - ftp stats from the web servers (pureftpd) - traffic from the smtp servers (postfix/amavis) ... to one box, where i can summerise the data each night and present to clients (and their end-users) when logged into their specific control panel (wholesale panel and 'skinned' end-user control panel). The apache/ftp logs would still be kept in standard form on the hosting platform for customers to download if need be... I am just in the idea phase here, so any suggestions at this stage are very much welcome. Simon
Hello !I got the solution for you. I've been using a system that collect informations for all services (smtp + pop + imap + ftp + http) that was counting all each day. Then I've changed my mind and did it in real time.
What I wrote is called "mysqmail". It's a mail logger system written in C (quite fast, it's not ugly perl) that takes the daemon log files as input, and send the result to mysql. I did also some (quick and small) modifications to mod_log_sql2 so it manages a "score board" table with the bytes sent and hit number for each vhost of my apache servers. All that is packaged in nice .deb binary package, I'm working currently in building a nice Debian repository for sarge.
The result is that I have now all my traffic accounting in real time for each user and per services, and sum up in the bandwidth monitoring page of my (open source) control panel. A web server is running in production since last Friday (that's 6 days already) with that patched mod_log_sql2. As I'm writing, it has served 273 141 hits (2GB of data) for a phpBB based site (this site does nearly 4 million hits a month). The additional load is very low, and it's very nice to have it in real time.
Have a look into the following pages if you want to know more: http://www.gplhost.com/?rub=softwares Best regards, Thomas Goirand, GPLHost LLC Manager -- http://www.gplhost.com GPLHost:>_ Opensource hosting worldwide Webspaces featuring GPL control panel Locations in Florida and Singapore