I have a web application running on Tomcat and would like to have an automated way of monitoring the application to ensure it is running, and if not start/restart tomcat (and also send an email alert). I'd like to do more than just check that Tomcat is running and ensure that a default page from the application can be loaded.
Is there any tool that would be best to do this, aside from writing a shell script and running it as a cron job?
Best Answer
Please look into the Monit utility.
This is a daemon and process-watching tool and can provide the alerts and defined actions that you may need.
A quick example: