[mrtg] Zooming in to mrtg graphs

William Owen William.Owen at profilesmail.com
Fri Dec 26 15:34:02 CET 2008

Being a big fan of Tobias' work, SmokePing uses a JavaScript library
(appears to be using something like this code
ype-scriptaculous/) to achieve the zoom in/out that I think you are
talking about.  It is as simple as dragging a dropping in a pre-canned
graph.  I haven't personally messed around with it but I love the
functionality and it could be a good working example to start off with.
Whatever you come up with will likely be a custom solution as I don't
think this I've seen anyone share a working example of this that is MRTG
specific.  Just don't forget to give credit where it is due.




Check out the Demo on the links on the left and then select an
individual graph.  From there you'll see a time indication in a pair of
text  boxes and be able to quickly drag-select a time span represented
on the graph.  Steve makes a valid point that you can't see data that
isn't there but I know that the "WOW" factor for my superiors is there
with this solution in SmokePing even though they usually zoom in so far
as to have 2-3 CDPs on screen J.  Sometimes it's easier to add a widget
than explain why they don't actually need it.


From: mrtg-bounces at lists.oetiker.ch
[mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of Steve Shipway
Sent: Wednesday, December 24, 2008 10:47 PM
To: Sheikh, Nasarullah; mrtg at lists.oetiker.ch
Subject: Re: [mrtg] Zooming in to mrtg graphs


The first thing you needto understand is the nature of the RRD files.
Because the data is normally only polled every 5minutes, and then rolled
up into 'RRA's at 5min, 30min, 2hr and 1day granularity which are
preserved for <800 CDPs (combined data points), the practical upshot is
that, in many cases, the details you want simply are not there.


A 1-hour graph can give you only the granularity you poll at; if you do
5min polls, then you will get only 12 data points in an hour.


Similarly, if you are looking at the weekly graph (30min CDPs) and want
to zoom in on a point 4 days ago, then your 5min RRA has already expired
by this point and you are already looking at the best detail available.
Zooming in to a 1-hour graph would give you the grand total of 2 points
on your graph.


Having said all that, if you use the Routers2 frontend, there are 'zoom
in' and 'zoom out' buttons; these will simply move between daily,
weekly, monthly and yearly graphs.  If you enable RRD Archiving then you
will be able to select Daily graphs for any date you have archived.
Finally, an 'Export to CSV' option is available on all graph pages to
give you the data in the best available granularity.


If you modify your RRD file to store data much longer in the RRAs, and
to poll at 1min granularity, then the data will be available to make the
graphs you want.  However, as this would be highly customised, you'd
need to define your own functions to call the RRD library with the
necessary parameters to generate the graphs.  None of the available
frontends (routers2, 14all, mrtg-rrd) cater for this as they deal with
the standard configurations.





From: mrtg-bounces at lists.oetiker.ch [mrtg-bounces at lists.oetiker.ch] On
Behalf Of Sheikh, Nasarullah [Sheikh.Nasarullah at uk.bp.com]

Is there a way to zoom in and out on the graph area. I want to see the
graphs of a particular time in details..e.g a hour graph rather than a
24 hour graph.

Is there a way that the data that generates the image can be exported to
xls later. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20081226/5a984941/attachment.html 

More information about the mrtg mailing list