[mrtg] Longer time in daily graph

Steve Shipway s.shipway at auckland.ac.nz
Mon Jul 4 23:22:16 CEST 2011


The short answer is "Yes, but..."

The current version of MRTG will by default generate an RRD that holds approximately 2 days worth of high-resolution data (older versions, like 1.0.x, would generate 1.5 days).  You can increase this by using the 'RRDRowCount' directive in the MRTG .cfg file, but this ONLY takes effect at the INITIAL CREATION TIME.  If you want to extend the RRAs subsequently, you will need to use the 'rrdtool resize' command to extend RRA numbers 0 and 1 (and maybe the others too) to at least 12x24x(#days) rows -- so 900 or more rows.

In the MRTG .cfg file, use:

RRDRowCount: 900

On the command line, use:

rrdtool resize targetname.rrd 0 GROW 300
rrdtool resize targetname.rrd 1 GROW 300

These add an additional 1 day to the existing 2 days' worth of data in the RRA.

However, this doesn't help you actually view the data.  Standard MRTG, 14all and mrtg-rrd will still only display a single day's data in the graph.  If you use Routers2 as your frontend, then you cna get 2-day wide graphs.  Enable 'extendedtime=yes' in the routers2.conf, and make sure you have the latest version of Routers2.  This will enable the 'extended' graph styles (l2D and x3D) -- though you may also need to edit the sorder option in the routers2.conf to display these styles -- use 'sorder = t n n2 l l2 x2 x3 l2D x3D' to get a nice selection.

If you want to see all 3 days then you're currently on your own.  You'll need to either use rrdcgi to generate the entire RRDTool graph comman, or make your own frontend, or modify the Routers2 code to give a triple-data-width option (not too hard).

If you want to see more than 3 days at a time, then maybe stick to using the 'Weekly' graph, which shows about 8 days.

A final option, if you use Routers2, is to enable 'RRD Archiving' (see the Routers2 manual) in which case you'll be able to view historical data from any archived date, although not simultaneously.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.shipway at auckland.ac.nz<mailto:s.shipway at auckland.ac.nz>
Ph: +64 9 373 7599 ext 86487

________________________________
From: mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch [mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] on behalf of Stefan Hellman [stefan.hellman at uddevalla.se]
Sent: Monday, 4 July 2011 10:12 p.m.
To: mrtg at lists.oetiker.ch
Subject: [mrtg] Longer time in daily graph

Is there any way to get longer time in the daily graph? I would like to have at least 3 days, so that on Monday I can see what happened in the weekend.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20110704/450bb91b/attachment.htm 


More information about the mrtg mailing list