Is it possible to determine if a Tomcat has started successfully AND all of the webapps deployed to it have also started successfully?
Of course I can trawl the Tomcat’s log file, but is there an easier way?
I need to be able to monitor the tomcat programmatically, since I need to start about 15 Tomcats (they can be started in serial). I’m not afraid to write a bash script and monitor the output of each log looking for the success message or any error messages, but surely there’s a more elegant way?
The most accurate way to ensure a service is up and running is to hit that service with a client.
In the case of WebApps on Tomkat, a cron job that hits some page of each app that indicates the application’s status (up, down, etc.) is the best way to do this.
I say it’s the best way for a number of reasons: