I am planning to write a bash script and run it as a daemon in the background. The script will continuously monitor the tomcat server logs for any exception, error, etc.
When an exception occurs, it will trigger an event and will handle it accordingly (say, by taking java thread dump, etc). I can write the logic on what to do in case of error found in the logs. All I need to know is how to pass information from the daemon to my error handling script.
Could you give me an idea on how to achieve this? Also, any tools which may help me with this task.
Any help will be much appreciated.