[GTALUG] capturing the output of any program and inserting in db
Tim Tisdall
tisdall at gmail.com
Wed Oct 29 14:34:39 UTC 2014
On Wed, Oct 29, 2014 at 8:40 AM, Dave Cramer <davecramer at gmail.com> wrote:
> Is there anything out there that is written simply ? By this I mean I
> don't want to have to install a framework or a jvm or any large
> dependencies. Ideally this would be written in bash or the like.
>
> The goal is to monitor cron jobs using something other than mail.
>
Is the DB requirement necessary? I think Mauro's suggestion is fine if you
don't need to put it into a DB as you can just have all the output
redirected into a logging file.
Just to improve on his suggestion though:
0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ >> /tmp/backup.log 2>&1
That last little bit says to redirect the STDERR to STDOUT so you'll also
get error messages logged. Otherwise you'll also get an email if there's
anything on the STDERR.
-Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20141029/0451b17b/attachment.html>
More information about the talk
mailing list