Daily/weekly/monthly output aggregation

Mikolaj Rydzewski miki at ceti.pl
Mon Nov 17 13:17:41 PST 2003


On Mon, 17 Nov 2003, Lapinski, Michael (Research) wrote:

> The way I deal with it is by the size of the message,
> day in day out the messages are usually +- a few bytes
> different in size when things go normal. Maybe write
> something that flags messages smaller or larger then
> the daily average of the runs...

Hello,

Why don't you like the idea: no output means no errors? Just create your
periodic scripts to produce no output when everything is fine. Cron will
not mail you anything what has produced no results.

Just to get the idea.  I know, it isn't fool proof; there are more secure
ways to do this, etc. But it works ;-)

#!/bin/sh

log=`mktemp /tmp/.log.XXXXXX`

# ... perform your stuff, i.e.
/usr/local/sbin/backup > $log 2>&1

if [ $? -ne 0 ]; then
	cat $log
fi
rm -f $log


-- 
Mikolaj Rydzewski      <miki at ceti.pl>        http://ceti.pl/~miki/
                    PGP KeyID: e17c4bd5
There are three kinds of people: men, women and unix.


More information about the freebsd-isp mailing list