[mrtg] Re: Scaling using MaxBytes, AbsMax, and Unscaled.

Peter Glanville peter_glanville at cuk.canon.co.uk
Thu Aug 7 10:16:05 MEST 2003



> The result is an unscaled graph, but that has the AbsMax as the vertical
limit,
> instead of MaxBytes. Is this technique possible, or did I misunderstand
the
> documentation? My goal is to have graphs that display only to the 3mbps
limit,
> and crop all that goes above that limit.



By default, 14all.cgi plotted graphs to maxBytes, MaxBytes1&2 or AbsMax, as
supplied. Rateup under MRTG behaves differently.

I asked Rainer (the author) about this, and very helpfully he replied with
a solution (for an older version of 14all):

To get 14all.cgi to plot graphs up to MaxBytes, bursting to AbsMax only as
required:

Look for these lines in the CGI:
                my $max = intmax($cfg->{targets}{maxbytes}{$log},
                        $cfg->{targets}{maxbytes1}{$log},
(1)                     $cfg->{targets}{maxbytes2}{$log},
(2)                     $cfg->{targets}{absmax}{$log});
                $max *= $factor;
(3)              push @args, '-l', 0, '-u', $max, '-r';

Remove the line marked with (2).
Replace the comma (,) at end of line (1) with a close bracket ')' and a
semicolon (;).
Remove the part >>, '-r'<< (ie. the '-r' with the preceeding comma) from
line (3).

ie:
                my $max = intmax($cfg->{targets}{maxbytes}{$log},
                        $cfg->{targets}{maxbytes1}{$log},
(1)&(2)                 $cfg->{targets}{maxbytes2}{$log});
                $max *= $factor;
(3)              push @args, '-l', 0, '-u', $max;

This worked for me, though I have since moved on to Routers2.cgi instead

---------------

However, this does not fix your problem.

You want it to log everything, but only plot traffic below 3Mb. (why the
log????)

Solution. Use two targets in MRTG. One has Absmax, and logs everything, and
graphs up to the overnight backup level. The other has no Absmax, and
therefore cuts off at Maxbytes, and gives you a Graphs with only the low
level data.

Regards
Peter





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