0

I'd like to monitor bandwith on my VPS. I think that the easiest way is to parse http-logs (%bytes-send% value). Are there any scripts or software (freeware) that does bandwidth usage graphs like (example) cpanel? Thanks a lot.

PS of course, i can write it, but i don`t want to invent a bicycle :)

4 Answers 4

1

I use AWStats to do some analytics data including data transfer stats. For Apache it will support those logs out of the box. For nginx I am unsure, but you can always write custom rules for a log (For example, I wrote one for HAProxy logs).

I would this reporting and not monitoring myself. For monitoring I would monitor/graph network usage with something like Monit, Cacti, or Nagios. Although this would include other data as well.

0

For monitoring logs - Analog: www.analog.cx. It's a bit heavy to set up (lots of config options) but pretty powerful. You can set it up to write small, machine readable files that feed in to your stats server (such as Zabbix or Nagios).

Bear in mind, though, that your web logs might not report the bytes served, they might just report the size of the file requested. (Not used nginx, but I know apache does this.) If you serve a lot of big downloads, then this can lead to an enormous over-estimation of bandwidth, if you consider many download managers will fire off 16 or 32 requests for the same file...

Apache has a logio module, which sacrifices some of the immediacy of logging for a true count of bytes served.

0

You can also use the apache mod_status module and query it with any of the tools mentioned above, but the stats are pretty generalized.

1
  • My tool of choice is Zenoss Core :) Nov 19, 2010 at 16:10
0

From the best I can tell, Apache does log partial transfers, it logs them as 206 and gives a byte count. I just had to update my (this) bandwidth script a few weeks ago.

http://crunchtools.com/software/crunchtools/racecar/

This will give you real quick and dirty reporting, but no breakdowns per domain. I am working on a solution for that now. It is not a trivial problem. I use awstats for analyzing how my content is doing, but there is no way (that I know of) to calculate bandwidth in a report format.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .