[mrtg] Fwd: Re: Using Logfiles for Customer Billing

Dan Ellis danellis at rushmore.com
Wed Feb 14 17:27:54 MET 2001



Hello, I have created a little script to not only graph the data, but keep the
actual readings and total bytes transferred stored in a log file.  we use this
to bill customers whenthey go over a predetermined level (say 40Gb/month).  I
stick the script in /usr/local/bin/bandlog (the log files are stored here also)
and create a normal cfg file.

Target[x]: `/usr/local/bin/bandlog 10.x.x.x public 100000000`  (The third #
is 			where the blue line gets put, or the threshold value)
MaxBytes[x]: 100000000
AbsMax[x]: 10000000000  (some arbitrary large value)
Options: gauge

also, be sure to include a script to rotate the log files in
/usr/local/bin/bandlog every month (this is what resets the counters).  Using
logrotate you can specify how long you want to keep the logs (accurate to 5
minutes no matter how long ago they are).

The scripts works well and won't fail in the host is lost for a while.

Let me know what you think.

Quoting "Knill, David" <David.Knill at Netigy.com>:


> I am working at a medium sized ISP and have just installed MRTG and it's
> working great. I am interested in using the logfiles to produce reports
> (for
> customer billing) showing their average monthly usage based on the 95th
> percentile of the 5 minute intervals for the entire month.
> 
> I have reviewed the logfile format page on www.mrtg.org. My question(s):
> 
> 
> At what point does MRTG "rollup" the data in the logfiles from 5 minutes
> to
> 30 minutes? After a week? 30 Days? Is this configurable? 
> 
> I'd really like to keep 5-minute polling data for customers for 3 months
> or
> so. 
> 
> Does anyone have any good scripts that would perform this kind of
> function
> they would be willing to share? 
> 
> David Knill 
> Senior Consultant -- CCIE #6105 
> Netigy Corporation 
> Portland, OR USA
> david.knill at netigy.com 
> 
> 
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> 
> 


-------------------------------------------------
Sent by Black Hills Fibercom Webmail!

----- End forwarded message -----


-------------------------------------------------
Sent by Black Hills Fibercom Webmail!


-- Attached file removed by Listar and put at URL below --
-- Type: application/x-perl
-- Size: 0 bytes
-- URL : http://www.ee.ethz.ch/~slist/pantomime/bandlog.pl


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list