vote up 3 vote down star
5

Hi all,

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.

flag

5 Answers

vote up 3 vote down check

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.

link|flag
Good thoughts, thanks! Gives me something to start with. – mnewell Jul 24 at 15:44
vote up 1 vote down

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/

link|flag
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. – mnewell Jul 24 at 14:41
vote up 1 vote down

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.

link|flag
vote up 1 vote down

For EC2 instances there are two "perspectives" when it comes to monitoring.

The "outside world perspective"

What do the users see? Is your server/service available? How fast is it?

You can monitor this using a monitoring service (see http://serverfault.com/questions/1014/can-anyone-recommend-a-website-monitoring-service) or a monitoring software that runs on your own systems.

The "inside perspective"

How much load does the CPU experience? How much memory is free? How much disk or network traffic is going on?

There are two options to get this information:

A: Run a monitoring software directly on the server to monitor these parameters (that's what we do to get the results for www.cloudclimate.com).

  • Advantages
    • No extra cost
  • Disadvantages:
    • You must install&run&maintain the software.
    • You must have a software that matches the OS

B: With the recently introduced Amazon CloudWatch monitoring option you can get this information from the EC2 hypervisors. This is enabled in the AWS Management Console. Using a Cloudwatch compatible software you can track the data over time.

  • Advantages
    • Independent of the client OS
  • Disadvantages
    • it costs some 5-10 bucks extra per month

I have written a post about Amazon Cloudwatch and PRTG on my blog that explains how to do this.

Note: We are the creators of PRTG.

link|flag
vote up 0 vote down

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.

link|flag
If your load balancer routes a request to a slow instance, that user will care. – Eric J. Sep 29 at 20:06

Your Answer

Get an OpenID
or
never shown

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