[mrtg] adding a ten year RRA
Stuart Kendrick
skendric at fhcrc.org
Wed Nov 17 18:44:50 MET 2004
hi,
i'd like to add a ten year RRA to my MRTG installation.
has anyone done this? i'm wanting a sanity check on the changes i'm
planning to make ...
the relevant section from mrtg (i'm simplifying a bit):
my $interval = $$cfg{interval} || 5;
my $rows = $$rcfg{'rrdrowcount'}{$router} || ( 4000 / $interval);
# [for my environment, $interval = 5 and $rows = 4000/5, i.e. 800]
my @args = ($dotrrd, '-b', $time-10, '-s', int($interval * 60),
"RRA:AVERAGE:0.5:1:$rows",
"RRA:AVERAGE:0.5:".int(120/$interval).":800",
"RRA:AVERAGE:0.5:".int(1440/$interval).":800",
or, to convert to numbers:
1 * 5 minutes = 5 minutes
24 * 5 minutes = 120 minutes (2 hours)
288 * 5 minutes = 1440 minutes (24 hours)
RRA:AVERAGE:0.5:1:800 # 800 rows of 5 minute data ... ~66 hours
RRA:AVERAGE:0.5:24:800 # 800 rows of 2 hour data ... ~66 days
RRA:AVERAGE:0.5:288:800 # 800 rows of 24 hour data ... 800 days
i figure that all i need to do is to add:
1314 * 5 = 6570 minutes (4.5625 days)
RRA:AVERAGE:0.5:1314:800 # 800 rows of ~4.5 days ... 3650 days
"RRA:AVERAGE:0.5:".int(6570/$interval).":800",
and of course do the same for the RRA:MAX line as well
so, by adding two lines, i think i can tell mrtg to create and update an
RRD which is averaging and maxing data across 10 years ...
and then ... all i would have to do is to modify mrtg-rrd.cgi to display
the ten year (or perhaps a five year) graph ...
i'm figuring that this addition will inflict only a small processing and
disk io hit ... after all, rrdtool only updates this aspect of the RRD
every ~4.5 days.
can anyone foresee a problem with my modifying mrtg this way?
--sk
stuart kendrick
fhcrc
--
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