Apache 2.2.9, Ubuntu 8.10
I am trying to find a way to monitor the bandwidth usage on my server broken out by each virtualhost WITHOUT installing something like PLESK, CPanel, or ISPConfig that is capable of modifying my server. I guess I am looking for a READ-ONLY solution. Since I manually administrate my servers I don't like the idea of installing a web accessible third party administration panel.
I am not even interested (necessarily) in getting graphical data out of the system, just so long as I can see bandwidth usage numbers by domain (preferably sub-domain as well) in some useful time increments like week/month/day. In the absence of time increments I will just run it in cron and manually capture the necessary time based increases.
I currently run Cacti as a system monitor but have been unable to find anything that I can add to Cacti that will gather the data I am needing. I did have a look at AWStats, but from what I could tell it only gave whole system bandwith usage by device and not by VHost (please correct if I am mistaken there).
So, is there a package I can install that already does just this?
Can I modify Cacti to show this information?
If no to the above, is there some bash script that I can run that will give me this output that I can later integrate into my own code?
Thanks in advance!