I've written a very simple shell script to generate the MRTG config in bulk. Enjoy!
#!/bin/sh
CFGMAKER=/usr/bin/cfgmaker
MRTG=/usr/bin/mrtg
for i in sw01 sw02 sw03 rt01 rt02 rt03
do
DEV=panda-$i
$CFGMAKER --global 'WorkDir: /home/mrtg' --global 'Options[_]: bits,growright' --show-op-down --ifref=descr --ifdesc=descr --output /home/mrtg/$DEV.cfg public@$DEV
$MRTG $DEV.cfg
done
No comments:
Post a Comment