[mrtg] Re: --no-down
Shane Castle
swcxt at co.boulder.co.us
Fri Feb 1 00:35:43 MET 2002
Here is what I have used for Cisco Cat4000 switches.
YMMV.
And yes, I had to RTFM to get this info. Hey, it works!
You will have to remove the '\' chars and join the lines into
one big one in order to get it to work properly, I think.
--
Shane Castle | "Perfection, then, is finally achieved, not
Boulder County Info Svcs | when there is nothing left to add, but when
Boulder CO USA | there is nothing left to take away."
| - Antoine de Saint-Exupery
---makeswcfg Korn shell file ------------------------------------
#!/bin/ksh
if [ $# -eq 0 ]
then
echo "Usage: makeswcfg switch..."
exit 1
fi
while [ $# -ne 0 ]
do
rtr=$1
/usr/local/mrtg-2/bin/cfgmaker --ifref=name --ifdesc=name --show-op-down \
--if-filter='if ($$i{ifSpeed} == 0) {if ($$i{Name}=~/^Fa/) \
{$$i{ifSpeed}=100000000};if ($$i{Name}=~/^Gi/) \
{$$i{ifSpeed}=1000000000};};if ($$i{ifSpeed} < 100000000) \
{$$i{ifSpeed}=100000000};if (@prob) {0} else {1};' public@$rtr >${rtr}.cfg
shift
done
-------------------------------------------------------------------
On Thu, 31 Jan 2002, Chirhart, Brian wrote:
>
>Wow - Leonard.... You sound a bit bitter... :)
>
>Hey - add a command to your Cisco configs on your switches. I think it will
>make you happy again.
>
>Bandwidth 100000000 - for Fast E
>Bandwidth 1000000000 - for gig
>
>And hey - everybody gets RTFM'd now and then.
>
> -----Original Message-----
>From: Leonard Miller [mailto:Leonard_Miller at udlp.com]
>Sent: Thursday, January 31, 2002 8:20 AM
>To: mrtg at list.ee.ethz.ch
>Subject: [mrtg] --no-down
>
>
>Hello,
>I know this command will not comment out interfaces that are
>operationally down, however,
>I get sections that are commented out because they have a speed of
>zero. BTW, I am going to
>be running this against 100 Cisco switches, some CAT5000 with over 100
>interfaces each.
>I don't want to have to go into each config file and manually remove
>the #'s. I want this to monitor
>the interfaces even if nothing is connected so that when something is
>connected or disconnected,
>it will show it automatically.
>Is there a way to do this with CFGMAKER? And don't tell me to RTFM
>because I already RTFM.
>Unless there is a new version of the FM and I don't have it.
>
>Thanks
>
>Leonard W. Miller, CCNA
>
>--
>Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
>Archive http://www.ee.ethz.ch/~slist/mrtg
>FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
>WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
>
>
>
>--
>Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
>Archive http://www.ee.ethz.ch/~slist/mrtg
>FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
>WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
>
>
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list