[mrtg] Re: Using the include statement

McClain, Dave mcclad at jacobsons.com
Wed Aug 8 21:26:22 MEST 2001


Hello All 

I am having problems with the include statements.  My config file is as
follows:

WorkDir: c:\inetpub\wwwroot\mrtg\logs

RunAsDaemon: Yes
Interval: 5

Include: c:\mrtg2917\bin\mwdomain3.cfg
Include: c:\mrtg2917\bin\sms.cfg
Include: c:\mrtg2917\bin\openview.cfg
Include: c:\mrtg2917\bin\magic.cfg
Include: c:\mrtg2917\bin\sts_mew.cfg
Include: c:\mrtg2917\bin\sts_db1.cfg
Include: c:\mrtg2917\bin\ace2.cfg
Include: c:\mrtg2917\bin\backup.cfg
Include: c:\mrtg2917\bin\mwprint.cfg
Include: c:\mrtg2917\bin\hemlnets.cfg
Include: c:\mrtg2917\bin\hemlnedb.cfg
Include: c:\mrtg2917\bin\proxy.cfg
Include: c:\mrtg2917\bin\ras.cfg
Include: c:\mrtg2917\bin\vpn.cfg

The error message is:  > in CFG file <c:\mrtg2917\bin\sms.cfg>  does not
make sense

I put each include statement on a separate line.  Any ideas?

Thank you

Dave

-----Original Message-----
From: Alex van den Bogaerdt [mailto:alex at slot.hollandcasino.nl]
Sent: Tuesday, August 07, 2001 8:10 PM
To: mcclad at jacobsons.com
Cc: mrtg at list.ee.ethz.ch
Subject: Re: [mrtg] Using the include statement


McClain, Dave wrote:

> I am trying to create graphs for several servers, and would like to find
out
> how to use the include statement (syntax).  I have a seperate config file
> created for each server, and I would like to know if one config file can
be
> used (with the include statement) to call each of the seperate config
files.

You probably should remove some lines from each of the config files.
I never tried it but I can imagine that multiple Workdir statements
are going to be a problem.

Start with one big -working- config file.  Create an empty file which
should be included.  Now set "Include: /path/to/this/file" into the
config file.  Rerun MRTG to see if you did it right.  Now start moving
(not copying) lines from the big config file into the included file.

Of course you don't have to follow the exact recipe but it tells you
how the end result should look.  Essentially after replacing each
include statement with its file contents, you should end up with
your original config file.

More hints:
In the main config file you can define globals (like Workdir),
defaults (XSize[_]: 400), prefixes (Options[^]: growright)
etcetera.  Then in the included files just use the Target and
other necessary items.

HTH
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+


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