[mrtg] Re: sample cfg file for multiple cfg files

Paul C. Williamson pwilliamson at mandtbank.com
Fri Sep 28 16:45:54 MEST 2001


No problemo, that's why we're all here.  To learn.  And I'm in 
a good mood today.

How does the master config for mrtg look now?  You just need to 
replace the global stuff (htmldir, etc.) at the top with a file called 
something like global.cfg and put the htmldir & other stuff in there.  
Then do an Include to the full path for that file.  Do that and let 
me know if it works.  Take small steps.  If you're confused about 
the global options,  RTM.

Paul

>>> Aldo Salinas <aesalinas at plant.pp.panam.edu> 09/28/01 10:28AM >>>
im sorry to bother you, i know its a pain on the neck having a linux newbie
leeching of your knowledge, but i can't figure this thing out.  can you
please send me sample global parameters as well as the parameters for the
individual cfg files.

"global.cfg"
Include: /path/file.cfg
Include: /path/file2.cfg
Include: /path/file3.cfg
WriteExpires: Yes

"file.cfg"
HtmlDir: /path/
ImageDir: /path/

can you show me how to do this because the WorkDir: and the HtmlDir:
Directory: all of this stuff trows me off. and where would i place the
RunAsDaemon:

Sorry to bother you again, and i really apreciate your help.

-----Original Message-----
From: Paul C. Williamson [mailto:pwilliamson at mandtbank.com] 
Sent: Friday, September 28, 2001 6:49 AM
To: aesalinas at plant.pp.panam.edu 
Cc: mrtg at list.ee.ethz.ch 
Subject: [mrtg] Re: sample cfg file for multiple cfg files



Sure.  In each of the individual cfgs put a Directory: option and that willt
 ake care of it.  I think you could actually put in what I'd call a "localg
 lobal" option at the top of each cfg to put all the related information 
into on directory.  The only problem with that is if you forget to do thati
 n one of the cfgs, you'll end up with some misplaced data.
That way, you would not have to put a directory statement for each 
target within a cfg.

Paul

>>> Aldo Salinas <aesalinas at plant.pp.panam.edu> 09/28/01 09:27AM >>>
can i have different directories for every device that i want to monitor (to
keep everything organized a little better) and if so how can i acompish that
with only one global.cfg file.

-----Original Message-----
From: Paul C. Williamson [mailto:pwilliamson at mandtbank.com] 
Sent: Friday, September 28, 2001 5:54 AM
To: MRTG users <mrtg at list.ee.ethz.ch; aesalinas at plant.pp.panam.edu 
Subject: [mrtg] Re: sample cfg file for multiple cfg files



I'm not sure if this got through, so I'll send it again.

In your standard mrtg.cfg file, you've got global options like 
WorkDir (although I recommend replacing that with htmldir, 
logdir, imagedir & icondir) and WriteExpires: Yes.  You still 
need to have that info.  I just put that into it's own include file 
called globalstuff.cfg.

Then in my other cfgs, I just have target specific information.
IOW, I run cfgmaker, name the cfg something like 10.0.10.50.cfg, 
and then put that in my master cfg file.  So now the only thing in my 
master config is:

Include: /usr/local/mrtg/cfgs/globalstuff.cfg

#Name: Choke Router
Include: /usr/local/mrtg/cfgs/10.0.10.50.cfg


these lines.  Makes it very easy to maintain, add new stuff, etc.
I also have a program that builds my website automatically each 
day, so when I put in a new entry, I make sure I have the correct 
name so that everything is sorted and written to the correct files 
for web viewing.

Paul


>>> Aldo Salinas <aesalinas at plant.pp.panam.edu> 09/27/01 04:33PM >>>
i dont understand can you explain it to me.

-----Original Message-----
From: Paul C. Williamson [mailto:pwilliamson at mandtbank.com] 
Sent: Thursday, September 27, 2001 1:18 PM
To: aesalinas at plant.pp.panam.edu 
Cc: mrtg at list.ee.ethz.ch 
Subject: RE: [mrtg] sample cfg file for multiple cfg files


You need to make sure you only have one set of "global" commands.  I usually
put those in another include file and include it in the main config file I
want to run mrtg against.

You know, workdir, whatever...


Paul

>>> Aldo Salinas <aesalinas at plant.pp.panam.edu> 09/27/01 04:05PM >>>
I do have the full path

include: /path/filename.cfg
include: /path/filename2.cfg
include: /path/filename3.cfg

but is this all the text that i need on the main cfg file
or am i missing something else. cause that is how my config file looks like


-----Original Message-----
From: Paul C. Williamson [mailto:pwilliamson at mandtbank.com] 
Sent: Thursday, September 27, 2001 1:03 PM
To: mrtg at list.ee.ethz.ch; aesalinas at plant.pp.panam.edu 
Subject: Re: [mrtg] sample cfg file for multiple cfg files


Use the full path for the includes.

>>> Aldo Salinas <aesalinas at plant.pp.panam.edu> 09/27/01 03:42PM >>>

I had asked a question earlier today about monitoring a 2 different routers
and a server, Hans answered that i needed to use the include statement. but
i cant get it going.  all i did was made a new cfg file and typed 3
different lines that start like

include: filename.cfg
include: filename2.cfg
include: filename3.cfg

this could be stupid but im just starting with linux and mrtg. 

i would apreciate any sample configuration files.

Thank you very much

Aldo E. Salinas
University of Texas - Pan American
Physical Plant - Computer Support



--
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 

--
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