[mrtg-developers] MRTG Threshold checking fix

Do Jong Gwan daker at metri.re.kr
Tue Nov 7 04:40:01 MET 2000


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:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg-developers



More information about the mrtg-developers mailing list