[mrtg] Re: Design Methodology

Greg.Volk at edwardjones.com Greg.Volk at edwardjones.com
Mon Aug 19 16:40:36 MEST 2002

}Can someone provide me with a little insight as to how they 
}manage something similar to the following. I have 7 wire 
}closest each with between 40 and 50 switches. I would like to 
}generate configs for every switch which includes the following 
}for every interface :
}WithPeak[x.x.x.x_1]: ymw
}XSize[x.x.x.x_1]: 250
}Options[x.x.x.x_1]: growright
}Additionally, when I pull the configs, instead of:
}Traffic Analysis for 1  -- 
}PageTop[x.x.x.x_1]: <H1>Traffic Analysis for 1 -- </H1>
}<TR><TD>System:</TD>     <TD> in </TD></TR>
}I would like to see:
}Traffic Analysis for Port  1 
}PageTop[x.x.x.x_1]: <H1>Traffic Analysis for Port 1</H1>
}<TR><TD>System:</TD>     <TD> BayStack 450 - 24T </TD></TR>
}If any of these options can be set globally for the config, 
}this would be best case. If not, how can I configure them so 
}it affects every interface, without having to manually enter them. 
}Furthermore, will someone offer insight into how they have 
}found managing this type of beast easiest.

The cfgmaker command line in my config builder script looks like:

    $bindir/cat $staticdir/typical.cfg > $cfgdir/$cfgfile.cfg
    $mrtgdir/cfgmaker --ifref=name --ifdesc=descr --global "Options[_]: 
growright,bits" --subdirs=HOSTNAME $community@$cfgfile | $grepdir/grep 
-v '# ' | $grepdir/grep -v '###' | $mrtgdir/rmlines.sh >> 
$cfgdir/$cfgfile.cfg &

Where typical.cfg contains stuff like:WorkDir: /opt/mrtg/public_html
WithPeak[_]: wmy
IconDir: /images/

I pull out all comments with the 'grep -v' commands and all empty lines 
with the rmlines.sh script. I do this because I think 14all.cgi runs 
faster with smaller config files and there are a lot of unnecessary 
lines in cfgmaker's output from 14all's point of view. You should 
definitly experiment with the --ifref= and --ifdesc= directives as 
different switches respond in completely different ways to those. 

As for your question about managing this stuff, what aspect of managing 
are you talking about? Organizing the links to the graphs on a webpage 
in a useful manner? Or upkeeping your config files as the network 
changes? I use a java applet called alitree to organize my devices - 
see http://mrtg.gvolk.com for a small example. The applet scales pretty 
well - at work I have 369 devices listed in it. 

As for upkeep of the config files, on my big installation at work, I 
have devices and comm strings listed in flat files. These files get 
processed at 03:00 every day. Each device gets walked and new configs 
are built. At the end of the reconfig script, all the daemons get 
restarted. Unfortunately I've written all of this in shell script 
(/bin/sh) so it isn't very portable to non-unix platforms. And because 
I'm a generally sloppy scripter it would probably be difficult to get 
it going on unix systems other than the one I have it running on. ;)

-- Attached file removed by Listar and put at URL below --
-- Type: application/ms-tnef
-- Size: 2k (2385 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/11-WINMAIL.DAT

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