[mrtg] Local attributes?
s.shipway at auckland.ac.nz
Sat Jan 9 08:49:46 CET 2010
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.
From: mrtg-bounces at lists.oetiker.ch [mrtg-bounces at lists.oetiker.ch] On Behalf Of Daniel J McDonald [dan.mcdonald at austinenergy.com]
Sent: Saturday, 9 January 2010 4:00 a.m.
To: mrtg at lists.oetiker.ch
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.
Target[myrouter.somplace.edu.2]: 2:public at myrouter.somplace.edu
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
> mrtg at lists.oetiker.ch
Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
mrtg mailing list
mrtg at lists.oetiker.ch
More information about the mrtg