[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [afnog] [Mailer-Daemon at mantse.gh.com: Mail delivery failed:returning message to sender]



On Mon, Oct 13, 2003 at 10:41:04AM +0200, Stephane Bortzmeyer wrote:
> On Fri, Oct 10, 2003 at 09:32:32PM +0100,
>  Brian Candler <B.Candler at pobox.com> wrote 
>  a message of 126 lines which said:
> 
> > Run it from cron every 10 minutes. 
> 
> VERY bad idea, IMHO. It will fill up your disk even faster. The
> problem is that cron has no memory of the previous run. If cron
> launches the script every ten minutes and the problem lasts two hours
> during the lunch, you get twelve messages for nothing.

12 x 2KB = 24KB. And if the mails are successfully delivered there will be
no disk space used apart from a few maillog entries.

> Instead, you should use a proper scheduler like mon
> <URL:http://wwwkernel.org/sofwtare/mon/> which can:
> 
> * trigger the alarm only after N failures,
> * only send the alarm every M minutes even when you monitor every N
>   minutes (with M >> N),
> * stop sending the alarms after N attempts (sort of automatically shut
>   down the alarm).   

Certainly, you can install something fancy and complicated if you like.
Equally, you could argue that you should have snmpd running and a
centralised NOC workstation which logs and graphs every variable on your
system. But I'm quite happy to install a single file which needs no extra
software support (and I'd install it in addition to the snmp monitoring, if
you have it)

A basic script which just sends an E-mail when your disk utilisation hits
90% on any partition is a real life-saver. The point of this script is to
start sending mails *before* the system gets to a critical condition.

Regards,

Brian.
__________________________________________________
This is the Africa Network Operators' Group(AfNOG) 
technical discussion list.
The AfNOG website is: <http://www.afnog.org>