Per VHost Apache Bandwidth Stats
September 16, 2008 6:56 AM   Subscribe

Linux/Unix Admin Filter: What is your preferred method for monitoring bandwidth use per virtual host in Apache?

I could just log everything and run AWStats/Webalizer/whatever, but that seems overkill when all I really want is a MRTG or RRD Tool graph for each virtual host to indicate bandwidth used the last day, week, month and year. Do you use the impossible to find mod_watch or something else?
posted by Brian Puccio to Computers & Internet (3 answers total) 3 users marked this as a favorite
Best answer: Apache2? The Apache 1.x mod_watch does seem to have vanished, but mod_watch4 is what you want to use on Apache2, and seems to be available.
posted by rhizome at 9:28 AM on September 16, 2008

If you're using IP-based virtual hosts, you could use your operating systems packet filter (e.g., "iptables" under Linux, or "ipf" under Solaris) to track bandwidth by IP address. If you're using name-based virtual hosts, this won't work for hopefully obvious reasons.

Maybe bwmod, which was a Google "Summer of Code" project:

The httpd web server doesn't really have a way to control how much
resources a given virtual host can have/ a user can request.
This module should be able to limit access to certain areas
of the website and to limit mailicious users

posted by larsks at 9:32 AM on September 16, 2008

Response by poster: I should clarify...

Apache 2. Named based, not IP based (some sites share, others with SSL certs don't).

I looked at bwmod and while I can throttle with it, I didn't think it gave me the option to view stats in a way that something like MRTG or RRD Tool could process.
posted by Brian Puccio at 10:41 AM on September 16, 2008

« Older Why is beer suddenly making me sick?   |   Need new sheets Newer »
This thread is closed to new comments.