Your skill will accomplish what the force of many cannot |
|
PerlMonks |
RFC: MRTG config file parsing, improved?by Hercynium (Hermit) |
on Jun 27, 2007 at 01:01 UTC ( [id://623520]=perlmeditation: print w/replies, xml ) | Need Help?? |
Good afternoon! I recently came to the Monks looking for wisdom in handling an ever-growing collection of MRTG config files... In the end, I could not find a solution with other people's code, so I wrote something new. This is my first CPAN module, and I hope it will be useful to others. I especially hope I can get some feedback on improvements, features, bugs, etc. BTW, there's a bug in the globals() method - I just found it today :( If you're wondering *why* this module might be useful... I'm currently using it to load, parse, and store to a DBM::Deep file the MRTG configs for over 450 routers, many of which have in excess of 1000 interfaces. It completes this task in less than 5 min. on a modest P3-700Mhz/768MB/40GB-IDE server without exhausting the RAM. Another script then uses the module to load the 'compiled' configs and generates an entire website complete with node indices, interface indices and summaries from data in the RRD files, and does this in about 35 min. (I did almost no optimization of this script - just changed the hash references from Tobi's structure to mine... however, the slowness may also be because the RRD files are stored on other servers over NFS.) Please feel free to criticise, compliment, or otherwise offer any info that may help this be useful to people other than myself! Also... I have many other thoughts on trying to improve the state of SNMP programming and management using Perl. Is anybody else reading this interested in discussing it further?
Back to
Meditations
|
|