How do you ensure that your applications in production are up and running? How do you alert your team of developers if something goes wrong?
I’m asking this because I’m writing a bash script to check for this issue, I’d like to know if there is a smarter or more complete way to achieve this. The idea behind is this command: wget -q -O - APPLICATION_URL_HERE | grep 'ERROR 404, I still have to check all kinds of HTTP errors, but you can get the point of what I mean. If an application is recognized to not be running a mail is sent to the list of the team it belongs to.
All my applications are running on Apache Tomcat.
Tomcat can typically be monitored via JMX; as can be seen from this documentation. This will normally be the cleanest way to monitor, since this can be integrated into a number of third-party monitoring tools that can support all kinds of notifications and bells and whistles.
This may still not give you the full ‘outside view’ picture if your site is up and visible to customers, since there is a number of other things that can go wrong. Quite a few of the management systems also allow you to install agents that do this and integrate into the total monitoring scheme. There are a number of open source jmx tools