Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to hear your approaches for monitoring Linux instances running in EC2. I'm very accustomed to using Nagios to monitor all manner of aspects of a Web-based application's ecosystem, but its model doesn't seem to lend itself particularly well to machines that are fairly frequently destroyed and recreated. My EC2 instances are intermediated by RightScale, which has its own monitoring scheme that I'm not finding hugely useful -- though I do plan to look into their monitoring some more.

The instances in question run normal open-source stuff: MySQL, Apache, Passenger, Rails.

Many thanks in advance.

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

It is possible to use the ec2 tools in a script to dynamically generate a nagios config. If all EC2 instances need the same services, then you associate the service with a hostgroup rather than a host, and dynamically generate the host/hostgroup definitions with the script run via cron. You can then do a kill -HUP (or /etc/init.d/nagios reload or svcadm nagios refresh) and have nagios reload the new config. This is a lightweight operation (doesn't require a restart) and so can be done pretty often. The script would have to read a list of active instances and their addresses, and generate a host definition for each one.

share|improve this answer
    
Good thoughts, thanks! Gives me something to start with. –  user5336 Jul 24 '09 at 15:44
add comment

Do you want to monitor each EC2 instance or overall uptime and performance?

We do not really care what each instance does, but rather monitor our overall web application response time and functionality. There are a few tools for this. We like AlertFox, which runs pretty complex iMacros based transaction monitoring scripts for us every 15 min.

share|improve this answer
2  
If your load balancer routes a request to a slow instance, that user will care. –  Eric J. Sep 29 '09 at 20:06
add comment

It might be worth looking at cloudkick. It will depend on exactly the kind of monitoring you need to do, but it's specifically designed for EC2:

https://www.cloudkick.com/

share|improve this answer
    
Thanks. Since we're already using Rightscale, we're unlikely to move to Cloudkick, though. While I've got my issues with Rightscale, it has a pretty large feature set -- Cloudkick may not meet our needs on other fronts. –  user5336 Jul 24 '09 at 14:41
add comment

I use Ganglia to monitor my cluster:

http://ganglia.info/

Just make sure to configure it to use unicast and drop dead hosts after some amount of time.

share|improve this answer
add comment

protected by voretaq7 Oct 24 '12 at 16:23

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.