[mrtg] migrating MRTG

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Wed Jul 23 09:08:19 CEST 2014


----- Original Message ----- 
From: "Jay Hennigan" <jay at west.net>
To: "Ian Diddams" <ian.diddams at issolutions.co.uk>; <mrtg at lists.oetiker.ch>
Sent: Tuesday, July 22, 2014 6:53 PM
Subject: Re: [mrtg] migrating MRTG


> On 7/22/14 2:07 AM, Ian Diddams wrote:
>> Thanks for that Jay.
>>
>>> Assuming classic MRTG, most likely just wait.
>> Something is clearly not correct because this has been running for over a 
>> week now without any history showing n the graphs.
>>
>> When you say
>>
>>> If you did the concatenation correctly by removing the top line
>>
>> The top[ line of the "old" log, or the "new" one?  Or both?
>
> The top line of the old log, and any duplicate timestamps between the
> two, throw out the invalid or zero ones.
>
> What you want is to have a file where the top line is essentially "now"
> in terms of UNIX timestamp and has three integers, timestamp plus two
> data points.  Below that are timestamps going back in history
> (decreasing numbers) each with five integers, timestamp followed by four
> data points.

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.

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

> What I do:
>
> On "new" logfile, leave beginning intact.  You'll find a point where
> that instance started and everything below it has just a timestamp
> followed by four zeros.  Delete the lines with zeros.
>
> On the "old" logfile, delete all lines from the beginning up to and
> including the last timestamp in the "new" file so that no timestamps are
> duplicated or overlap.
>
> Concatenate them with the new file first, and replace the .log and .old
> with this result.

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?

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

> Wait five minutes, 30 minutes. two hours, and one day for all graphs to
> generate.

or just delete the images, wait 5 minutes.



More information about the mrtg mailing list