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

Re: [SAGE] Output from "cron" command



DJ Gregor wrote:

 > Also, Tom Reingold wrote:
 >               ,
 >  > How about sending the mail to /dev/null and using some tool, such as
 >  > "mon" to monitor your services.
 >
 > I cringe when people send mail to /dev/null, because they always end up
 > getting bitten by it.  I've seen so many broken things stay that way for
 > days or weeks until users start reporting a problem because no one was
 > watching an automated report or the output from a batch process was
 > getting thrown away to /dev/null.
 >
 > I've found that making liberal use of "egrep -v" to filter out known
 > good output from cron jobs is a great and simple way to keep
 > administrators from getting junk mail from cron when things are okay,
 > while at the same time making sure that they get notified when something
 > is abnormal.  I'm also a fan of forwarding all mail from automated
 > processes to a single account that gets filtered by procmail.  Procmail
 > logs everything that should be logged, can call scripts to store data in
 > a RRD (http://www.rrdtool.org) for data collection and reporting, and
 > can forward "bad" things off to humans to deal with, ideally by creating
 > a ticket in your problem tracking system.

I think all blanket rules have problems. This is arguably an offshoot of
the halting problem. Programs generate output, and it's impossible which
lines of that output are consequential, even if you're a genius at
writing filters. You have to find some way of sifting through it, and I
believe part of that is looking at things that you expect to be
uninteresting. And that, of course, is anti-thetical to sending email to
/dev/null.

  > Service monitoring is also a must-have so that you can know when
  > something breaks before the users are beating down your door. :)  Being
  > able to say "oh, yeah, I fixed that problem last night" or "I've been
  > working on it for 10 minutes, it should be fixed soon" is much better
  > than "Email problem?  What email problem?"

Yeah, I look great when I can say that.

Tom