[mrtg] migrating MRTG

Jay Hennigan jay at west.net
Wed Jul 23 18:57:50 CEST 2014

On 7/23/14 12:08 AM, Alex van den Bogaerdt wrote:

> Five sections:
> 1: the header (the top)
> 2: lines for the daily graph, 5 minutes each, these are also used for the 
> other graphs below
> 3: lines for the weekly graph, 30 minutes each, these are also used for the 
> other graphs below
> 4: lines for the monthly graph, 2 hours each, these are also used for the 
> other graphs below
> 5: lines for the yearly graph, 1 day each.

Yes, but the file itself doesn't contain any distinguisher between your
items 2 through 5 above.  When rateup runs, it generates the file with
lines having timestamps 5 minutes apart for a little over a day, then 30
minutes apart for a little over a week, etc.

> There is an implied number "duration" for each line in {2..5}

Not really.  The subtraction of the timestamp of the previous line will
let you know the granularity of that particular pair of data points, but
every time rateup runs the number of lines with differences of 300,
1800, 7200, and 86400 seconds will remain constant, with "now" at the
top and loss of granularity of data as it gets older.

> I'm afraid that you take lines from e.g. the weekly graph resolution and 
> transplant them to the yearly graph resolution. It will probably "work", as 
> in you end up with a file that is not complained about, but does rateup 
> consolidate a couple of "weekly" lines into one "monthly" line?

Yes it does.  Actually four "weekly" 30-minute-interval lines to one
120-minute-interval "monthly" line.  The file itself has no indicator as
to whether a line is "weekly" or "monthly".  Rateup generates a file
with some number of lines 5 minutes apart, then another number of lines
30 minutes apart, etc.

> Perhaps I'm wrong and rateup does handle this properly. If so, please tell 
> me.

It does.  If you have a "short" file with a big gap in timestamps, as
long as they are in order, the next time rateup runs it will fill in the
gap(s) with duplicate data so the file will have the intended number of
lines at the correct intervals.  This will result in graphs with a
"flat" section representing the time interval of the missing lines.

Jay Hennigan - CCIE #7880 - Network Engineering - jay at impulse.net
Impulse Internet Service  -  http://www.impulse.net/
Your local telephone and internet company - 805 884-6323 - WB6RDV

More information about the mrtg mailing list