[mrtg] Re: E-mail Alarm for MRTG.
Justin Shore
listuser at vinnie.ksu.ksu.edu
Tue Aug 29 04:00:36 MEST 2000
At 3:07 PM +0800 8/28/00, Jack Lo wrote:
>Hi All,
>
>I am using MRTG-2.8.12 on RedHat 6.2 platform !
>When there have some SNMP error, I will receive mail at root mail box !!
>Is there have any E-mail alarm setting for MRTG system ?
>Because I also want to get E-mail alarm from MRTG into my personal E-mail
>box " jack at talink.net "
Jack,
While creating a mail alias or moving the cron stuff to
another user would work, it basically sucks because you have to redo
what you've already done, changing your habits, adding users,
actually requires work, blah blah blah. Want an easy solution? When
crond runs something and it generates a STDOUT or STDERR it sends
mail to the owner of the crontab. That's a given. To change this
behavior, add this line to your mrtg user's crontab:
MAILTO="jack at talink.net"
Put it right before your block of MRTG cron entries so it defines
that environment variable before they run. From that point in the
crontab on all STDOUT and STDERR will be sent to the user you define.
Likewise if you don't want any mail sent you could make it MAILTO="".
If you want your MRTG user to actually receive certain pieces of
mail, put them at the beginning of the crontab before your MAILTO tag.
For that tidbit of cron joy and many others...
man 5 crontab
HTH
Justin
--
--
Justin Shore K-State Linux Distro Mirror, Sysadmin
macdaddy at vinnie.ksu.ksu.edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>
*Internet2 Users*
<ftp://quest.ksu.ksu.edu/pub/mirror/linux>
--
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