|
Packit |
667938 |
=head1 NAME
|
|
Packit |
667938 |
|
|
Packit |
667938 |
mrtg-rrd - How to use RRDtool with MRTG
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 SYNOPSIS
|
|
Packit |
667938 |
|
|
Packit |
667938 |
After using MRTG for some time you may find some limitations, mostly in the
|
|
Packit |
667938 |
areas of performance and graphing flexibility. These are exactly the areas
|
|
Packit |
667938 |
addressed by RRDtool. To learn more about RRDtool check out its website on
|
|
Packit |
667938 |
|
|
Packit |
667938 |
http://oss.oetiker.ch/rrdtool
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 RRDTOOL INTEGRATION
|
|
Packit |
667938 |
|
|
Packit |
667938 |
When using mrtg with RRDtool you are replacing F<rateup> with the
|
|
Packit |
667938 |
RRDtool perl module F<RRDs.pm>. To enable RRDtool support in mrtg
|
|
Packit |
667938 |
you have to add the line
|
|
Packit |
667938 |
|
|
Packit |
667938 |
LogFormat: rrdtool
|
|
Packit |
667938 |
|
|
Packit |
667938 |
to your mrtg config file.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG needs access to both the RRDtool perl module B<RRDs.pm> and to the
|
|
Packit |
667938 |
B<rrdtool> executable.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
If these two items are not installed in locations where perl can find them
|
|
Packit |
667938 |
on its own, then you can use the following two parameters to supply the
|
|
Packit |
667938 |
appropriate directories.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
For the location of the B<rrdtool> executable you put
|
|
Packit |
667938 |
|
|
Packit |
667938 |
PathAdd: /usr/local/rrdtool/bin/
|
|
Packit |
667938 |
|
|
Packit |
667938 |
or
|
|
Packit |
667938 |
|
|
Packit |
667938 |
PathAdd: c:\rrdtool\bin
|
|
Packit |
667938 |
|
|
Packit |
667938 |
For the location of the perl module it would be:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
LibAdd: /usr/local/rrdtool/lib/perl/
|
|
Packit |
667938 |
|
|
Packit |
667938 |
or
|
|
Packit |
667938 |
|
|
Packit |
667938 |
LibAdd: c:\rrdtool\bin\lib\perl
|
|
Packit |
667938 |
|
|
Packit |
667938 |
When you have made this modification to the configuration file, several
|
|
Packit |
667938 |
things will happen when you run mrtg again with the new config file:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=over
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item 1.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
mrtg will take all your old C<.log> files and B<convert> them to C<.rrd>
|
|
Packit |
667938 |
format. (The C<.log> files don't get touched in the process, so if things
|
|
Packit |
667938 |
don't work out they are still there.)
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item 2.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
mrtg will use B<rrdtool> to update its databases. These will have a new format
|
|
Packit |
667938 |
called I<rrd> which is totally different than the native I<log> format of
|
|
Packit |
667938 |
the classic mrtg.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item 3.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
mrtg will B<not> create any webpages of graphs anymore.
|
|
Packit |
667938 |
It will only query the routers for traffic information and update its I<rrd>
|
|
Packit |
667938 |
databases.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=back
|
|
Packit |
667938 |
|
|
Packit |
667938 |
The advantage of whole thing is that the mrtg will become B<much>
|
|
Packit |
667938 |
faster. Expect the runtime to drop to 20% of the previous value. (I would like
|
|
Packit |
667938 |
to get some feedback on this from folks with large installations.)
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Mind you, though, while the logging process of RRDtool is B<very> fast, you
|
|
Packit |
667938 |
are also gaining some time by neither creating graphs nor updating webpages.
|
|
Packit |
667938 |
The idea behind this is that it is more efficient to create
|
|
Packit |
667938 |
graphs and webpages on demand by using a cgi script.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
At the moment there is no B<official> script to do this, but two
|
|
Packit |
667938 |
contributers have created such scripts:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=over
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item One4All aka 14all.cgi
|
|
Packit |
667938 |
|
|
Packit |
667938 |
This was the first program to take over the webpage creation and graphing task.
|
|
Packit |
667938 |
It has been developed by Rainer Bawidamann
|
|
Packit |
667938 |
rainer.bawidamann@web.de. You can find a copy
|
|
Packit |
667938 |
on Rainers website: http://my14all.sourceforge.net/
|
|
Packit |
667938 |
The program comes with its own documentation
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<routers2.cgi>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
This is another CGI frontend for mrtg running with rrdtool. The main difference between this and 14all is
|
|
Packit |
667938 |
that the web pages it creates are much more stylish than the ones from mrtg, plus they support User
|
|
Packit |
667938 |
Defined summary graphs and different levels of Authentication and Authorisation. This has been written by
|
|
Packit |
667938 |
Steve Shipway (steve@steveshipway.org). You obtain a copy, and find a forum and demonstration system at
|
|
Packit |
667938 |
http://www.steveshipway.org/software/
|
|
Packit |
667938 |
The program comes with its own installation instructions and install script.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=item B<mrtg-rrd>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
The mrtg-rrd script is a CGI/FastCGI application by Jan "Yenya" Kasprzak for
|
|
Packit |
667938 |
displaying MRTG graphs from data in the RRDtool format. It is an intended
|
|
Packit |
667938 |
replacement for the 14all.cgi script. It can make your monitoring system
|
|
Packit |
667938 |
faster because MRTG does not have to generate all the PNG files with graphs
|
|
Packit |
667938 |
every 5 minutes or so. Instead of this the graphs are generated on-demand
|
|
Packit |
667938 |
when the user wants to see them. http://www.fi.muni.cz/~kas/mrtg-rrd/
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=back
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 FUTURE
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Just as a side note: MRTG-3 will be based entirely on rrdtool technology.
|
|
Packit |
667938 |
But don't wait for it ... get going B<now>!
|
|
Packit |
667938 |
|
|
Packit |
667938 |
=head1 AUTHOR
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
|