[mrtg] Re: Change cfgmaker flags via config file

Roberts, Larry Larry.Roberts at expanets.com
Tue Feb 4 18:42:01 MET 2003


Here is what I did since the --no-down didn't help me ( older Cisco gear )

I'm using a Linux based system.

I do this to add those interfaces back to the monitored state.

( NOTE THAT I HAND TYPED THIS SO MY SPACING MAY BE OFF.. ALSO YMMV )

sed 's/# Target/Target/'
sed 's/# SetEnv/SetEnv/'
sed 's/# Direc/Direc/'
sed 's/# MaxB/Maxb/'
sed 's/# Title/Title/'
sed 's/# PageTop/Pagetop/'
sed 's/#  <TAB/  <TAB/'
sed 's/#    <TR>/    <TR>/'
sed 's/#  </TAB/   </TAB>'

This will remove the # from the lines only. There are still other things to
do as well depending on what your configuration has put for its values.
On my Cisco gear, I had to search and replace the MaxB value ( it has 0, I
hard set to 100Mb ) I also have to fix the BW in the Description field as
well.

I created several scripts that all of the MRTG admins use to add devices. I
generate a generic file, run that file through those sed statements, then
after the cleanup is finished append this file to the running file and
restart the mrtg process.

If you have a Windows based system, I would imagine you could use a find and
replace in notepad, but I haven't done that so I cant be sure that would
work.

As always, test on a backup of the config to see if it is giving you the
results that you want....





Thanks

Larry 

-----Original Message-----
From: Aaron Conaway [mailto:Aaron.Conaway at HOSystems.com] 
Sent: Tuesday, February 04, 2003 12:26 PM
To: MRTG List (E-mail)
Subject: [mrtg] Change cfgmaker flags via config file



I have a buttload of routers and switches that are being monitored from one
config file.  My coworkers added a few switches while I was gone, but didn't
use the "--no-down" flag; is there any way to edit the config file to make
the change, or will we have to do them all over again?

----------
Aaron Conaway
Network Engineer III
Verisign, Inc. -- Telecom Services Division http://www.verisign.com
Office:  912.527.4343
Fax:  912.527.4014

--
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