Just a caveat for people using Routers2 as the frontend - for historical reasons, the Routers2 parser does NOT handle redefinition of the _/^/$ targets in the same way as MRTG does. With Routers2, the last setting wins and applies to everything in the file.
The reason for this is that way back in the early days of MRTG this behaviour was undefined and so Routers2 was coded to handle it as seemed logical at the time. When Tobi explicitly defined this behaviour it was too late to make the rewrite of the parser, and we'd have lost backwards compatibility. Steve ________________________________________ From: [email protected] [[email protected]] On Behalf Of Daniel J McDonald [[email protected]] Sent: Saturday, 9 January 2010 4:00 a.m. To: [email protected] Subject: Re: [mrtg] Local attributes? > I.e. something that falls between global and per-device attributes. A local > attribute would be valid for all devices following its declaration, until > redefined. > > > Is that feasible in the current codebase? That is precisely how the [_], [^] and [$] operators work. >From the man page: There can be several instances of setting the default/prepend/append values in the configuration file. The later setting replaces the previ- ous one for the rest of the configuration file. The default/prepend/append values used for a given keyword/target pair are the ones that were in effect at the point in the configuration file where the target was mentioned for the first time. Example: MaxBytes[_]: 1250000 Target[myrouter.somplace.edu.2]: 2:[email protected] MaxBytes[_]: 8000 Title[myrouter.somplace.edu.2]: Traffic Analysis for myrouter.somplace.edu IF 2 The default MaxBytes for the target myrouter.someplace.edu.2 in the above example will be 1250000, which was in effect where the target name myrouter.someplace.edu.2 first appeared in the config file. > > > > Dag B > > _______________________________________________ > mrtg mailing list > [email protected] > https://lists.oetiker.ch/cgi-bin/listinfo/mrtg -- Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX www.austinenergy.com _______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg _______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
