I need an open source tool for monitoring tomcat, like in case there is some fail down in backend services it will automatically detect the problem and kill tomcat port if required, I will tell you two cases:
1-When there's a problem with the active directory the application will automatically ping the active directory server and kill tomcat port.
2-When there's exceptions in the log file the application will automatically detect the problem and kill the tomcat port if required, depending on the exception that it received from the logs.