[mrtg] Re: One CFG for many servers...

Steve Shipway s.shipway at auckland.ac.nz
Thu Dec 18 21:41:09 MET 2003


>I've been using MRTG for some time now and I was wondering if 
>there is a way to use fewer cfg files then one for each server. 
One very useful feature is the Include: statement.

For example, why not have:

globals.h
-----------
	logformat: rrdtool
	Workdir: /usr/local/rrd

dev-a.cfg:
----------
	Include: globals.h
	Target[a-1]: ...
	...
dev-b.cfg
---------
	Include: globals.h
	Target[b-1]: ...
	...
master.cfg
----------
	Forks: 4
      Include: dev-a.cfg
	Include: dev-b.cfg
	routers.cgi*Ignore: yes

Now, you can call 'mrtg master.cfg' to update your .rrd files, you can use
'cfgfiles = *.cfg' in your routers2.conf to specify your devices for your
frontend, and you can edit globals.h to set your global settings.  It also
allows you to easily modify individual devices configurations without
touching all the other config files.

Keeping one file per device is much better for organisation, provided you
use Include:s in this way to make MRTG remain efficient and separate out the
globals for ease of management.

Steve

---
Steve Shipway: ITSS, University of Auckland
Email: s.shipway at auckland.ac.nz  Web: http://www.steveshipway.org/  
** We can only discover new oceans when we have the **
** courage to lose sight of the shore.              **

-- Attached file removed by Ecartis and put at URL below --
-- Type: text/x-vcard
-- Size: 155 bytes
-- URL : http://www.ee.ethz.ch/~slist/p/07-Steve%20Shipway.vcf


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