Well, the code specifically constrains the predictions to AbsMax or MaxBytes because that is the behaviour of MRTG. It also calculates the time it expects the line to cross that boundary (or the zero line).
However, you can stop this. There is a test in the code that checks for zero or >{maxbytes} and sets the predicted value if so. You might end up with some weird graphs if you remove this, though - eg when the predicted line is too steep. It's there as a sanity check.
Is there any reason why you cant change the AbsMax or MaxBytes in your .cfg file? If these are really the hard limits of the value you are graphing, then why would you wantthe prediction line to go beyond them?
Look for this in the code:
Code:
if($curvala > $interfaces{$target }{maxbytes} and !$hita
and !$interfaces{$target }{noi}) {
$curvala = $interfaces{$target }{maxbytes}; $hita = 1;
$$trenddelta[0]=0;
push @info, "Max for ".$interfaces{$target }{legendi}
." ".localtime($t)."\\l";
}
if($curvalb < 0 and !$hitb and !$interfaces{$target }{noo}) {
$curvalb = 0; $hitb = 1; $$trenddelta[1]=0;
push @info, "Zero for ".$interfaces{$target }{legendo}
." ".localtime($t)."\\l";
}
if($curvalb > $interfaces{$target }{maxbytes} and !$hitb
and !$interfaces{$target }{noo}) {
$curvalb = $interfaces{$target }{maxbytes}; $hitb = 1;
$$trenddelta[1]=0;
push @info, "Max for ".$interfaces{$target }{legendo}
." ".localtime($t)."\\l";
}
The parts you need to remove are
$curvala = $interfaces{$target}{maxbytes}; and
$curvalb = $interfaces{$target}{maxbytes}; if you want to stop the prediction being capped at the max. I think you'll also need to remove the
$$trenddelta[0]=0; and
$$trenddelta[1]=0; if I remember rightly. This is being done from memory though...