1MRTG-RRD(1) mrtg MRTG-RRD(1)
2
3
4
6 mrtg-rrd - How to use RRDtool with MRTG
7
9 After using MRTG for some time you may find some limitations, mostly in
10 the areas of performance and graphing flexibility. These are exactly
11 the areas addressed by RRDtool. To learn more about RRDtool check out
12 its website on
13
14 http://oss.oetiker.ch/rrdtool
15
17 When using mrtg with RRDtool you are replacing rateup with the RRDtool
18 perl module RRDs.pm. To enable RRDtool support in mrtg you have to add
19 the line
20
21 LogFormat: rrdtool
22
23 to your mrtg config file.
24
25 MRTG needs access to both the RRDtool perl module RRDs.pm and to the
26 rrdtool executable.
27
28 If these two items are not installed in locations where perl can find
29 them on its own, then you can use the following two parameters to sup‐
30 ply the appropriate directories.
31
32 For the location of the rrdtool executable you put
33
34 PathAdd: /usr/local/rrdtool/bin/
35
36 or
37
38 PathAdd: c:\rrdtool\bin
39
40 For the location of the perl module it would be:
41
42 LibAdd: /usr/local/rrdtool/lib/perl/
43
44 or
45
46 LibAdd: c:\rrdtool\bin\lib\perl
47
48 When you have made this modification to the configuration file, several
49 things will happen when you run mrtg again with the new config file:
50
51 1. mrtg will take all your old ".log" files and convert them to ".rrd"
52 format. (The ".log" files don't get touched in the process, so if
53 things don't work out they are still there.)
54
55 2. mrtg will use rrdtool to update its databases. These will have a
56 new format called rrd which is totally different than the native
57 log format of the classic mrtg.
58
59 3. mrtg will not create any webpages of graphs anymore. It will only
60 query the routers for traffic information and update its rrd data‐
61 bases.
62
63 The advantage of whole thing is that the mrtg will become much faster.
64 Expect the runtime to drop to 20% of the previous value. (I would like
65 to get some feedback on this from folks with large installations.)
66
67 Mind you, though, while the logging process of RRDtool is very fast,
68 you are also gaining some time by neither creating graphs nor updating
69 webpages. The idea behind this is that it is more efficient to create
70 graphs and webpages on demand by using a cgi script.
71
72 At the moment there is no official script to do this, but two con‐
73 tributers have created such scripts:
74
75 One4All aka 14all.cgi
76 This was the first program to take over the webpage creation and
77 graphing task. It has been developed by Rainer Bawidamann
78 rainer.bawidamann@web.de. You can find a copy on Rainers website:
79 http://my14all.sourceforge.net/ The program comes with its own doc‐
80 umentation
81
82 routers.cgi, servers.cgi and generic.cgi
83 These are other cgi frontends to mrtg running with rrdtool. The
84 main difference between this and 14all is that the web pages it
85 creates are much more stylish than the ones from mrtg. These tools
86 have been written by Steve Shipway steve@steveshipway.org. You can
87 find a copy in http://www.steveshipway.org/software/ The programs
88 come with their own installation instructions.
89
90 mrtg-rrd
91 The mrtg-rrd script is a CGI/FastCGI application by Jan "Yenya"
92 Kasprzak for displaying MRTG graphs from data in the RRDtool for‐
93 mat. It is an intended replacement for the 14all.cgi script. It can
94 make your monitoring system faster because MRTG does not have to
95 generate all the PNG files with graphs every 5 minutes or so.
96 Instead of this the graphs are generated on-demand when the user
97 wants to see them. http://www.fi.muni.cz/~kas/mrtg-rrd/
98
99 Paul C. Williamson has written a more in-depth page on how the whole
100 process works, including some performance figures. You can find his
101 page on http://www.geocities.com/paulcwilliamson/mrtg/rateup2rrd.html
102
104 Just as a side note: MRTG-3 will be based entirely on rrdtool technol‐
105 ogy. But don't wait for it ... get going now!
106
108 Tobias Oetiker <tobi@oetiker.ch>
109
110
111
1122.16.2 2008-05-16 MRTG-RRD(1)