[mrtg] Still duplicate entries.
Clint Alexander
Clint.Alexander at corp.ptd.net
Thu Sep 16 16:52:48 MEST 1999
Linux Build 2.2.5-15smp i686
MRTG Build 2.7.5
zLib Build 1.1.3
GD Build 1.6.3
libpng Build 1.0.3
As previously described on my last post about Duplicates,
I run a shell script that feeds a list of routers to 'cfgmaker' and outputs
to a mrtg.cfg:
---------------------------------------------------------------
#!/bin/ksh
#############################
### Create mrtg.cfg file
#############################
. ./config #include file for previously defined variables
rm mrtg.cfg
cat routers | while read ROUTER
do
echo "checking $ROUTER..."
./cfgmaker --vendor $Community@$ROUTER >> mrtg.cfg 2>>mrtg.error.log
done
-------------------------------------------------------------
Upon running ./mrtg mrtg.cfg I get duplicate errors.
These lines are automatically generated by cfgmaker.
------------------------
Target[this.router.com]: 2 <mailto:2:community at this.router.com> :
<mailto::community at gateway.ptd.net> community at this.router.com
MaxBytes[this.router.com]: 12500000
Target[this.router.com]: 5 <mailto:5:community at this.router.com> :
<mailto::community at gateway.ptd.net> community at this.router.com
MaxBytes[this.router.com]: 12500000
------------------------
I understand that the router should be ROUTER.PORT between the [ ].
And to fix this, I could fix it by hand. However, I have 210 routers that I
monitor, and can't possibly take the time to fix this, every time this
program runs.
Upon looking at the cfgmaker code, I found the lines where it figures out
what [ROUTER.PORT] are:
Line 386: $name = "$router.$index" if not $name or $name =~ /\s/;
and when outputting into the mrtg.cfg file:
Line 395: ${c}Target[$name]: $index:$community\@$router
Now, if $index is right, why is $name NOT getting $router.$index?
Instead its more like $name = "$router" if not $name or $name =~/\s/;
Again, this does not happen with EVERY router in my list.
Only about 30 or so do this. So, its not something I can just figure out
in the cfgmaker code. Its almost like, it has something to do with the
router name, because its the same routers that do it.
Could it be some setting on the router itself ?
Has anyone else ran into this same problem?
Any Ideas ? :)
Thanks again.
-------------------------------------------
Clint Alexander
clinta at corp.ptd.net
PenTeleData Engineering Dept.
[- Over-Estimate everything, and nothing will surprise you -]
-HV
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list