[mrtg] Local attributes?

Daniel J McDonald dan.mcdonald at austinenergy.com
Fri Jan 8 16:00:16 CET 2010


On Fri, 2010-01-08 at 08:07 +0000, dag at bakke.com wrote:
> Hi.
> 
> I see it has been a while since the last release of mrtg. Maybe it is considered perfect by now.  :-)
> 
> If more development is planned, or a version 3 is ever released, how about allowing 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:public at myrouter.somplace.edu
        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
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg


-- 
Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
www.austinenergy.com



More information about the mrtg mailing list