[mrtg] Re: Handling of [^], [_] and [$] in mrtg.cfg

Tobias Oetiker oetiker at ee.ethz.ch
Wed Mar 12 20:24:27 MET 2003


Today Jan Kasprzak wrote:

HI Jan,

looking over the code it seems to at least try to work like this:

> ---------------------------------------------
> First example: everything is set up:
>
> PageTop[^]: PageTop-prefix
> PageTop[$]: PageTop-suffix
> PageTop[_]: PageTop-default
> Target[mytarget]: ...
> PageTop[mytarget]: PageTop-explicit
>
> $ mrtg ./mrtg.cfg && grep PageTop mytarget.html
> PageTop-explicit PageTop-suffix<BR>
>
> Why the "PageTop-prefix" is not here?


PageTop = PageTop-prefix  PageTop-explicit  PageTop-suffix

> ---------------------------------------------
> Second example: only the defaults
>
> PageTop[^]: PageTop-prefix
> PageTop[$]: PageTop-suffix
> PageTop[_]: PageTop-default
> Target[mytarget]: ...
> # PageTop[mytarget]: PageTop-explicit
>
> $ mrtg ./mrtg.cfg && grep PageTop mytarget.html
> PageTop-default<BR>
>
> I think the PageTop-prefix and PageTop-suffix should be here.

PageTop = PageTop-default

> ---------------------------------------------
> Third example: only the defaults; without [_]
>
> PageTop[^]: PageTop-prefix
> PageTop[$]: PageTop-suffix
> # PageTop[_]: PageTop-default
> Target[mytarget]: ...
> # PageTop[mytarget]: PageTop-explicit
>
> $ mrtg ./mrtg.cfg && grep PageTop mytarget.html
> PageTop-prefix<BR>
>
> I think the PageTop-suffix should also be here.

PageTop = PageTop-prefix PageTop-suffix

ifit does not there are bugs in  the code which are not intended
... patches welcome ... the code in question is in MRTG_lib.pm
around line 450ff ...

cheers
tobi

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, ETZ J97, ETH, CH-8092 Zurich, Switzerland
 / // _ \/ _ \/ /  System Manager Coach Time Lord Developer Designer
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/~oetiker +41(0)1-632-5286

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