[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mrtg
Subject:    Re: [mrtg] MRTG include directive.
From:       Dan <mrtg () dandoore ! com>
Date:       2007-09-13 21:21:03
Message-ID: 46E9A9BF.4040207 () dandoore ! com
[Download RAW message or body]

philpen01@westnet.com.au wrote:

> Is there a way to configure MRTG to ignore/bypass non-existant
> include .cfg files ? and/or is there a way to use a wildcard on the
> include directive (rather than add a specific include directive for
> each .cfg file) ?  

Probably your best way around this is to make a script that you call 
instead of 'mrtg MASTER.cfg' that builds the MASTER.cfg file for you and 
then calls MRTG with it.

I don't know shell/DOS batch without a white book with an animal on the 
front next to me but it would be something like:

echo to /apps/mrtg/MASTER.conf until EOF
# This is the Master.conf file
#
# Any options here...routers2cgi ignores etc.
EOF

For blah in /apps/mrtg/*.cfg
{
	echo to MASTER.conf "Include: $blah"
}

call /apps/mrtg /apps/mrtg/MASTER.conf

You'd have to have the master file as a different extension to the 
.cfg's to stop it adding it into itself but that's the sort of thing.

Dan.

_______________________________________________
mrtg mailing list
mrtg@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic