Hi Dan, As you say, I think you are trying too hard ;). I've used a couple of the techniques you talk about here. I had modified cfgmaker to do a bunch of things inside it because it already had the info. But you then loose ongoing new features of cfgmaker development (or edit every new version).
I had also put together a master script to call cfgmaker for all devices and build up the master "Include" configs for the mrtg production run. I think it is probably good enough to just use system (or backtick operator) to call it and throw the output where you need it (then build master Include configs). As often as we need to execute cfgmaker this would seem ok (daily per device at most). And now at this point I do not use cfgmaker at all. I have my own perl script which goes off and gets lots of stuff...and while it's at it build the mrtg devices config and master run configs. There are pro's/con's to this. On the pro side I build exactly what I need for other aspects of infraMon to operate. On the con side the infraMon mrtg implementation may be a bit rigid to some needs and it also does not take advantage of new cfgmaker features. Cheers, Woody... http://www.inframon.org - infraMon: Network Infrastructure Monitor http://www.micro-mess.com/forum/ - infraMon Questions/Discussions -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of McDonald, Dan Sent: Wednesday, September 10, 2003 6:46 AM To: '[EMAIL PROTECTED] ' Subject: [mrtg] Periodic config rebuilds I'm about to embark upon writing a script to change snmp community strings on a periodic basis. The strings will be random for each box, which will be great for security, but a pain for mrtg. I'd store the strings in a mysql table. My thought was to have one of the steps of the script run the cfgmaker procedure with some nice host and interface templates (and, obviously, the new community string). But it would be nice to write the script completely in perl. Since cfgmaker is already perl, I'd like to be able to call it as a module rather than passing arguments to it from a shell. Of course, the other option is to convince mrtg to pull the community string out of the database, but I figure there is enough churn in my network to warrant a fresh mrtg config once a week/month/quarter or so anyway, so I might as well regenerate the configs. Anybody thought about turning cfgmaker into a module before? Or am I trying too hard - I'm sure someone has done this kind of thing before and I shouldn't have to re-invent the wheel completely.... -- Daniel J McDonald, CCIE#2495 Austin Energy -- Unsubscribe mailto:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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
