[mrtg] External RRD Date

Steve Shipway steve at steveshipway.org
Mon Sep 27 06:08:48 CEST 2010

> From: mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch
> [mailto:mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On
> Behalf Of Q
> I have ntp data already gathered into an RRD file. I'm trying/wanting
> to get
> mrtg / routers2cgi to 'deal' with that data and display it along with
> all
> the other stuff that it's already doing/showing.

Provided the RRD File in question is in standard MRTG format, then you can create a dummy MRTG .cfg file for it, and then Routers2 will happily display it.  We actually do this for some data on mail delivery times.

However, the key thing is that the file MUST be MRTG compatible.  Specifically, this means that it must have at least two Data Sources, called 'ds0' and 'ds1' which are the metrics that will be graphed.  Preferably, you should have at least a MAX and AVG RRA for each of the 5min, 30min, 2hr and 1day cdps, each at least 400 cdp long, although if you don't then RRDTool will do its best with the data available.

If your RRD files doesn’t at least have the 'ds0' and 'ds1' datasets then it won't work; Routers2 does some verification first and will reject the file.

You then have two options.

1) Use a periodic script to do an export/modify/import to convert the relevant data to MRTG format, or
2) use rrdcgi with a huge mess of options to generate the graphs you require.

If you really want it inside the Routers2 interface, you could use a Routers2 plugin and write it to do step (2); or use the PageFoot on a related graph to hold an IMG tag that calls rrdcgi to make the graph.

I've had something planned in the Routers2 wishlist for about a year now to make a way for Routers2 to display a generic RRD file; however this is still in the planning stage and nowhere near even a beta release.


Steve Shipway
steve at steveshipway.org
Routers2.cgi web frontend for MRTG/RRD; NagEventLog Nagios agent for Windows Event Log monitoring; check_vmware plugin for VMWare monitoring in Nagios and MRTG; and other Open Source projects.
Web: http://www.steveshipway.org/software
 Please consider the environment before printing this e-mail 

More information about the mrtg mailing list