[Techtalk] MRTG

Almut Behrens almut_behrens at yahoo.com
Sun Sep 30 11:17:06 EST 2001


On Sat, Sep 29, 2001 at 09:27:25PM -0400, Saint Wolf wrote:
>
> trying to install mrtg from rpm on red hat 7.1 anyone know of a tutorial
> anywhere that could help me out? or anyone have any pointers?

I'm not sure whether there is an all-in-one tutorial for mrtg -- but
I'm quite sure that, if there is one, google will find it for you... ;)

Actually, I just tried a search with the keywords "mrtg tutorial" and
got this among the first 30 hits -- which looks moderately promising:

  "8wire - Network Traffic Monitoring with MRTG - 7/6/2001"
  http://www.8wire.com/articles/print_article.asp?printAID=2018

8wire.com seems to require a (free) account to view the pages, but you
can get around that by using google's cache:

http://www.google.com/search?q=cache:BOzIaHBQxyg:www.8wire.com/articles/print_article.asp%3FprintAID%3D2018++%22Generating+MRTG+Data+and+HTML+Files%22+site:www.8wire.com&hl=en

Besides that, the regular documentation that comes with mrtg (also
accessible at the mrtg website) should suffice to get you going.

The homepage is:  http://people.ee.ethz.ch/~oetiker/webtools/mrtg/
             (or  http://www.mrtg.org)


I'm not exactly sure where you got stuck, or what you need help on
in particular, so I've put together a few hints and pointers on both
installation and configuration.

Installation:

Either do the installation from the RH CDs or via the net (I don't have
the RH CDs at hand, so I can't tell how up-to-date the package is).
Via the net, do:

http://rpmfind.net/linux/rpm2html/search.php?query=mrtg

this locates (among others):

http://rpmfind.net/linux/RPM/falsehope/home/gomez/mrtg/mrtg-2.9.17-1.rh7.i386.html

which gives some information on the package, and the link to the rpm.
The following command should then normally get it installed:

rpm -i ftp://rpmfind.net/linux/falsehope/home/gomez/mrtg/mrtg-2.9.17-1.rh7.i386.rpm

(or download it first and then do "rpm -i mrtg-2.9.17-1.rh7.i386.rpm")

The package requires perl (which you most probably already have) and
the perl module GD.pm which depends on libgd which again depends on
libpng, libjpg, libz, libttf, etc. (for a full list see the above
webpage). So, if you don't have these already, you need to get them,
too.  Most of this stuff should already be installed on a typical
system, but the GD module might not...


Configuration:

See the unix-guide for basic setup and config instructions:

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/unix-guide.html

Most of the page is on installing from sources -- so, as you've used
the rpm, you can skip down to "Configuration".  There's more info on
the related config tool "cfgmaker", which you probably want to use:

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/cfgmaker.html

As mrtg creates images and html pages for web viewing, you of course
also need a web server to deliver them (though, for testing purposes
you could also directly access the files from the browser via
"file://<path-to-mrtg-output>/index.html". 

Basically, there are two ways of running mrtg: (a) have it create the
graphs and html stuff while gathering the statistics, or (b) have
those graphs be created on demand via a CGI script when someone is
accessing the mrtg stats via the browser. The latter method typically
saves a lot of unnecessary computation, as in this case, the monitoring
stats only need to written to some kind of database, here RRD (round
robin database) -- graphics are created only when needed.
More on that is on the following page, where you'll also find links to
the required (3rd party) CGI script distributions:

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg-rrd.html

There's also some info on the relation of mrtg to the seperate package
rrdtool from the same author (which you don't necessarily need):

http://faq.mrtg.org/rrdtool.html
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/

Generally, putting together nice mrtg config files for more than
trivial uses typically requires a certain amount of work. If you get
lost, just search the web for examples...

If you need further help, e.g. on setting up the web server, just
keep asking -- I'm sure someone here will know... :)

Cheers,

-Almut

PS: hope you don't perceive it as a RTFM, despite the numerous links :)





More information about the Techtalk mailing list