Forum Discussion
Hebex_35785
Nimbostratus
Mar 11, 2009Generic command in user_alert.conf
Hi,
I would like to execute a generic command when the state of a instance change
Is it possible to keep the message and pass it to my commande
Ex:
alert BIGIP_GTMD_...
hoolio
Cirrostratus
Mar 11, 2009Hi 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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects