Hey all, I'm new to the list and cutting my teeth on Perl (I'm a Windows/Exchange guy by trade) but seem to be the only person where I work who has setup MRTG successfully and has it monitoring all the routers and switches at each client I deal with on a daily basis.
We just installed Exchange 2007 into a multi-site organization, got everything working exchange wise perfectly and now I've turned my sites to monitoring it. Since I have MRTG already installed and it's got that wonderful external scripts option I figured I could write something simple to parse a file and pass the results to MRTG. It works...Sort of. Here is the Perl code: #!/usr/bin/perl $FileName = $ARGV[0]; open(queueFile, "$FileName"); my $queueFile = <queueFile>; $queueFile =~ s/copyqueuelength : //gi; print $queueFile; print "0\n"; print "0\n"; print "CopyQueueLength"; The script expects a file with 1 line in it. This file is generated and over written once every 15 minutes with the # changing (hopefully dropping and/or staying at 0) and downloaded from my Exchange 2007 server to me MRTG VM . CopyQueueLength : 200 Here is the MRTG config file: Target[exchange]: `/etc/mrtg/scripts/parseExch07.pl /etc/mrtg/scripts/copyqueuelength.txt` MaxBytes[exchange]: 100000 YLegend[exchange]: Files Legend1[exchange]: Copy Queue Length Legend2[exchange]: Replay Queue Length LegendI[exchange]: Copy Queue Length LegendO[exchange]: Replay Queue Length ShortLegend[exchange]: Files Title[exchange]: Copy Queue Length Options[exchange]: growright, nopercent, integer, unknaszero Colours[exchange]: GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff WithPeak[exchange]: ymw PageTop[exchange]: <H1>Copy queue Length</H1> When I run mrtg with this config file I get: readline() on closed filehandle NF at /usr/bin/mrtg line 1311. Any Ideas? Thanks in advance. Once I get this working I'll be sure to share it as so far I haven't found an app that will monitor Exchange 2007 SCR queue length. SCOTT HEATH | Network Engineer Elmwood Business Park #10 Commerce Court, Suite A | New Orleans, LA 70123 504-523-1466 | [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> |www.udi.com <http://www.udi.com/> ________________________________________________________________________ Making it easier
<<image001.jpg>>
_______________________________________________ mrtg-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers
