[mrtg] Re: Suggested Web Subdirectories and Config File Setup

Brander, Eric Eric.Brander at ACS-INC.com
Wed Jan 15 18:50:01 MET 2003


First, directory structure.  I don't use WorkDir, it lumps everything in to
one directory, and with thousands of files in there, it can be a bear to
navigate.

SO, instead I use:

HtmlDir: \mrtg\www
ImageDir: \mrtg\images
IconDir: \mrtg\images
LogDir: \mrtg\log
ThreshDir: \mrtg\thresh

That worked fine until my device list grew.. and therefore my directories
got huge again.  So I added the Directory[_]: feature, and every config file
has its own directory.

That's right, I use multiple config files, one for each device. On my Win2k
system I have several folders under \mrtg\bin called CFG-1, CFG-2, ..
through CFG-5.  Then I call a batch file that, with the directory name as
command line input, scans that directory for cfg files and runs MRTG on
them.  Not only that, but I time each instance so I can balance
simultaneously running jobs.  I use a script to get start time, write it to
a file, then get finish time, and graph the difference using MRTG.  Its just
a hodgepodge of junk I've thrown together, way to messy to post here, but it
works for me and I like it.  Oh, forgot to mention, I use Win2k's Task
Scheduler to kick off this process for each instance.  I had to run multiple
simultaneous instances because there was not enough time to run them one at
a time and still get the polling complete in a 5-minute interval.

Recently I've added a RedHat 8 box to my MRTG polling system.  Right now it
simply is there to take some of the burden off the main system...  Using
rateup to graph traffic, errors, and discards for each port on a 72-port
switch was alone taking over 3 minutes on my slow win2k box.  I'm also
testing the conversion to RRDTool - not as easy as its made out to be.
Since I'm a relative Linux novice, I don't have a complicated setup for
polling and logging intervals.  With just a couple configs I don't need such
an elaborate setup.  But I still use the separate directories, and the
Directory[_]: feature.  I run my intervals with cron and haven't had any
troubles.  But on this box, I created one MRTG.cfg and used Include:
statements.

Well there ya have it in a nutshell.  If anyone would like to know more
details about my win2k setup and how I log/poll/etc, let me know. 

Eric Brander
ACS
Texas CHIP Account
Sr. Communications Engineer - Information Systems Department
512.336.3331
Eric dot Brander at acs-inc dot com


-----Original Message-----
From: Jim Witherell [mailto:jwitherell at us.ibm.com]
Sent: Wednesday, January 15, 2003 11:00 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Suggested Web Subdirectories and Config File Setup




Hello, all! This question is not to fix a problem or to get something to
work. Instead, I am looking at how best to organize my output directories
and do my configuration files, mainly so it's easier to find the pages I
want. I realize that the program runs just fine any way you do it. My goal
is to end up with something logical that is easy for someone else to come
in behind me and see how I set it up, and easier to dig through all these
files and find what I need, even if I don't quite know what I'm looking for
yet...

I'm hoping you can tell me how you have yours set up, and maybe some
reasons why you chose to do it that way. I think having your viewpoint and
opinions will help me decide how I should do it, or if I'm already making a
mistake that will cause me to reconstruct this again later on.

So you know where I'm coming from... I've used MRTG (2.9.22) for a short
time (less than a year) on a Win2000 PC. I want to move it to Redhat8.0,
and maybe figure out how to use RRDtool (to speed up the routine,
correct?). Right now, I watch 10 switches and routers. I want to expand
that quite a bit, up to possibly 50 devices. I'm thinking if I grow it that
far, my Pentium II PC may have a tough time keeping up with it. Maybe you
have some advice on horsepower, memory, disk? I'm not a programmer, just
your average over-subscribed network guy trying to look farther into my
network than I do now.

ON OUTPUT PAGE LOCATION
First, on my output files, I have them all in my web server's /mrtg
directory (so I open my browser and go to http://web.internal.com/mrtg and
all the files are there). One reason I don't like this is that all my
switches, routers and everything are all thrown into this directory, and I
don't have a good index system set up yet.

I was thinking maybe the thing to do is create a subdirectory for each
device underneath the main /mrtg  directory. For example, the pages for
"router21" would be at http://web.internal.com/mrtg/router21 , and switch47
would be at http://web.internal.com/mrtg/switch47. Something I wondered is
if it may be nice to have /mrtg/router, /mrtg/switch, /mrtg/ups and
/mrtg/misc directories. This would help keep everything in nice, neat
categories.

Could you speak to how you thought through your file structure and set it
up? Maybe there's reasons why doing this subdirectory stuff would end up
being a pain...

ON CONFIG FILE SETUP
Secondly, regarding the config file, I set my "master.cfg" file to just
list the global settings, and then I use the "Include" command to reference
each devices' individual config file. I did that to avoid having to change
much in master file. Also seemed less risky to add a new config file when I
add devices. Less chances of screwing up other configs.

Along with that, do you keep your config files in the MRTG directory with
the other MRTG required files, or do you hold your config file(s) in a
separate directory?

Thanks for whatever thoughts you can give me!

Jim Witherell
Network Specialist                        --Live Intentionally--
IBM Global Services
513.425.3483




--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list