views:

1128

answers:

5

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 runinng a mail is sent to the list of the team it belongs to.

All my applications are running on Apache Tomcat.

+3  A: 

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

krosenvold
A: 

It depends on how detailed on what you sight is doing that you want to be. There are a number of companies that offer products and services that will monitor web applications to make sure they are fully running, and if not, explain where the error is and what it is doing. I think Empirix has one with their web testing suite, but it has been a while since I have used it, so they may have removed it then. There are lots of others too. The ones I have seen that do this are really automated tests that go through the site and report any errors found.

If you are really serious (as in wanting to spend money to make sure your sites are up), I would do a search on Gartner around web site availability. I am almost positive they are going to have a magic quadrant around this topic, and it will give you a good place to start.

I would say what you are doing isn't bad, you're just reinventing the wheel a little, and it probably won't be a thorough as the companies that focus on it. That being said, yours is definitely the cheaper alternative, and it may accomplish what you need.

Kevin
A: 

We are running a couple of background applications and services. They all contain a small class that is triggered by a TCP/IP connection to send status information to a webservice that prints out the info on an ASP page. The page is refeshed every 5 minutes by a meta tag.

I just need to open the page in my browser and check from time to time if any of the components is offline (very easy to spot because they turn red).

The whole system is very lightweight and easy to include in any project. It was written by one of my colleagues, and works quite well. We could also enhance it to send us emails if a connection is lost for more than x minutes, but so far there has been no need for that.

Treb
A: 

You may try Lambda Probe

Here's a short summary taken from their home page:

"... Ultimate tool for monitoring and management of Apache Tomcat instance in real time. Lambda Probe will help you to visualise real time information about Apache Tomcat instance via easy to use and friendly web interface. For more information please visit the overview section."

Boris Pavlović
A: 

Nagios, Zabbix, OpenNMS... theres countless monitoring tools built for exactly these kinds of jobs.

rektide