[mrtg] Re: crontab & MRTG emails

kelsey hudson khudson at tsss.org
Tue Oct 18 17:24:48 MEST 2005


Derek Winkler wrote:
> 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/mrtg
> /etc/mrtg/mrtg.cfg > /dev/null 2>&1 | mail -s "MRTG Report"
> someone at domain.com 

this just pipes both outputs to /dev/null and a mail will still be 
generated every five minutes, albiet empty.

> Hello,
> 
> I'm running MRTG on a Red Hat system, every 5 minutes through cron.
> 
> 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/mrtg /etc/mrtg/mrtg.cfg
> 
> If MRTG experiences any errors (like a host is down) it sends an email
> to root.  I would prefer those e-mails to go to someone else.  So I
> tried this...

Add a line before your mrtg cron entry which states:

MAILTO=someuser

then one after which reads:

MAILTO=root

that should do what you're looking for.

cheers,
-kelsey

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list