MRTG Threshold checking fix

"Do Jong Gwan" <[email protected]> Tue, 7 Nov 2000 12:40:01 +0900
Newsgroups gmane.network.mrtg.devel
Message-ID <00fd01c0486c$68bb5830$660110ac@daker>
Hi.

I'm using MRTG 2.9.4

Recently, I turn on threshold checking.
But it did not work.
Does anyone else who has experienced threshold check working?
I'm using intel Linux and alpha Linux running redhat 6.2.

I've checked mrtg script.
After some diagnostic tests,
I've found error in calling threshcheck subroutine.
Threshcheck routine is never used when threshold condition reached.

From line 233 of mrtg, it said as follows.

--------------------------------------------------------
debug('base', "Check for Thresholds");
threshcheck(\%cfg,\%rcfg,$cfgfile,$router,$cuin,$cuout)
         if defined $cuin and defined $cuout and
          ( defined $cfg{threshprogi} or
            defined $cfg{threshprogo} or
            defined $cfg{threshdir} );
--------------------------------------------------------

In this situation $cfg{threshprogi}, $cfg{threshprogo}, and $cfg{threshdir}
are not defined.
So there is no threshcheck call.

I've changed as follows. And this is working well in real world.
--------------------------------------------------------
debug('base', "Check for Thresholds");
threshcheck(\%cfg,\%rcfg,$cfgfile,$router,$cuin,$cuout)
         if defined $cuin and defined $cuout and
          ( defined $rcfg{'threshprogi'}{$router} or
            defined $rcfg{'threshprogo'}{$router} or
            defined $rcfg{'threshdir'}{$router} );
--------------------------------------------------------


Have a nice day.



--
Unsubscribe mailto:[email protected]?subject=unsubscribe
Help        mailto:[email protected]?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg-developers