MRTG-RRD(1) | mrtg | MRTG-RRD(1) |
mrtg-rrd - How to use RRDtool with MRTG
After using MRTG for some time you may find some limitations, mostly in the areas of performance and graphing flexibility. These are exactly the areas addressed by RRDtool. To learn more about RRDtool check out its website on
http://oss.oetiker.ch/rrdtool
When using mrtg with RRDtool you are replacing rateup with the RRDtool perl module RRDs.pm. To enable RRDtool support in mrtg you have to add the line
LogFormat: rrdtool
to your mrtg config file.
MRTG needs access to both the RRDtool perl module RRDs.pm and to the rrdtool executable.
If these two items are not installed in locations where perl can find them on its own, then you can use the following two parameters to supply the appropriate directories.
For the location of the rrdtool executable you put
PathAdd: /usr/local/rrdtool/bin/
or
PathAdd: c:\rrdtool\bin
For the location of the perl module it would be:
LibAdd: /usr/local/rrdtool/lib/perl/
or
LibAdd: c:\rrdtool\bin\lib\perl
When you have made this modification to the configuration file, several things will happen when you run mrtg again with the new config file:
The advantage of whole thing is that the mrtg will become much faster. Expect the runtime to drop to 20% of the previous value. (I would like to get some feedback on this from folks with large installations.)
Mind you, though, while the logging process of RRDtool is very fast, you are also gaining some time by neither creating graphs nor updating webpages. The idea behind this is that it is more efficient to create graphs and webpages on demand by using a cgi script.
At the moment there is no official script to do this, but two contributors have created such scripts:
Just as a side note: MRTG-3 will be based entirely on rrdtool technology. But don't wait for it ... get going now!
Tobias Oetiker <tobi@oetiker.ch>
2022-01-19 | 2.17.10 |