This is a simple script that sends all ERRORS, WARNINGS and CRITICALS in FlexGet's log file as an email.
Prerequisites:
Save the following as ~/bin/flexget_logwatch:
/usr/sbin/logtail -f$HOME/flexget/flexget.log |
grep -v INFO |
grep -v VERBOSE |
mail -E -s "Flexget logwatch" example@example.com
Remember to change the example address to your own =) You can use the -t option on logtail to test the script, it won't advance the read pointer in that case.
Then insert the script in your crontab:
@hourly ~/bin/flexget_logwatch
Now you will get an email every hour if there are new errors in FlexGet's logfile.