LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Stop MRTG Emails (https://www.linuxquestions.org/questions/linux-networking-3/stop-mrtg-emails-368406/)

sti2envy 09-30-2005 06:04 AM

Stop MRTG Emails
 
Hi, I got MRTG working nicely but when I turn off my PC, mrtg is unable to poll to it and emails to root account to complain about it. I just want to disable the emailing. Thanks.

scowles 10-01-2005 03:08 PM

Re: Stop MRTG Emails
 
Quote:

Originally posted by sti2envy
Hi, I got MRTG working nicely but when I turn off my PC, mrtg is unable to poll to it and emails to root account to complain about it. I just want to disable the emailing. Thanks.
Either stop monitoring the system you are tunring off -or- redirect stdout and stderr to devnull by adding ">/dev/null 2>&1" to the end of the mrtg line called in your MRTG script. i.e.

mrtg yada yada mrtg.cfg .... >/dev/null 2>&1

NOTE: If you have all monitored hosts in one file (like all targets in one mrtg.cfg) then all error output is suppressed for every device. So if MRTG is having problems with any of the 7x24 hosts, you will never know. A better approach would be to list all monitored devices in separate .cfg files and redirect stdout/stderr only for the host/device you are turning off. Example:

mrtg .... host1.cfg
mrtg ... host2.cfg
mrtg ... host3.cfg >/dev/null 2>&1

sulee 12-28-2005 01:57 AM

wrong entry
 
Ups, got here by mistake. Sorry.


All times are GMT -5. The time now is 09:31 AM.