On Mon, Nov 04, 2013 at 05:28:51PM +0000, James R Grinter wrote: > I'm not really looking for a tool as complex and powerful as Splunk > or greylog, either. Something that can watch a log file, match a > pattern, and execute a command is all I need right now.
1. Nagios can watch for log messages, plus it handles different work shifts, can send SMS, suppress dupes, etc. 2. logwatch (match pattern, send mail) + procmail (execute command). 3. use own lightweight solution (untested): logname=/path/to/logfile/logname mailrecip=2...@example.com interval=60 # check interval inseconds command='echo "$text" | mail -s "Warn: trouble in $logname @`hostname`" $mailrecip' while true; do text=`grep '^.*regex.*$' $logname` if [ "X$text" != X ] ; then eval $command # truncate logfile so you don't re-report every $interval secs > /path/to/logfile/logname # or run logrotate? fi sleep $interval done HTH, -- Charles _______________________________________________ Tech mailing list Tech@lists.lopsa.org https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/