[mrtg] Re: Monitoring MRTG to make sure it is running

Daniel J McDonald dan.mcdonald at austinenergy.com
Tue May 6 15:16:15 MEST 2003


On Tue, 2003-05-06 at 08:05, Jason Humes wrote:
> Hello
> Is there any way to monitor MRTG to make sure that it is running and
> graphing.  We use WhatsUp Gold to do most of our network/service monitoring.
> Thanks.
> 

If you use rrdtool as your backend, it's pretty easy to determine the
last time a particular target was updated:

#!/usr/bin/perl
use lib '/usr/local/rrdtool/lib/perl';
use RRDs;
$last=RRDs::last($ARGV[0]);
if (now() - $last > 900 ) {
	print "Been longer than 15 minutes without an update!";
};


just put in the file name of the .rrd you want to check.
I'm certain you can take that snippet and do something useful for your
monitoring program.



>  
> 
> Jason D. Humes
> 
>  
> 
> Applied Computer Solutions Inc.
> 
> 3020 St. Etienne Blvd.
> 
> Windsor, Ontario
> 
> Phone: (519) 944-4300 x26
> 
> Fax    : (519) 944-4247
> 
> Email : jhumes at acs.on.ca
> 
>  
> 
> 
> 
> --
> 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
-- 
Daniel J McDonald <dan.mcdonald at austinenergy.com>
Austin Energy

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