Forum Discussion
hooleylist
Mar 11, 2009Cirrostratus
Hi Romain,
I don't think syslog-ng provides a mechanism to run a shell command like that. I could be wrong though.
Mike Lowell added a handy Perl script to the Codeshare which watches a log file and can call a script if a specific string is found.
Action on Log
http://devcentral.f5.com/Wiki/default.aspx/AdvDesignConfig/ActionOnLog.html (Click here)
Perl script that runs as a daemon to watch a log file (like tail in the background), and runs a command when a certain message is found. Smart enough to keep working when log files get rotated, etc. Very handy when you need to run a command to start gathering debugging data or recover from failure that is indicated by a log message.
Aaron