Monitoring the Status of Your Amazon EC2 Instances

It has become more common for organizations to run mission critical workloads in the public cloud over the years. It is important to be able to monitor these workloads in order to ensure they are healthy.
Amazon Elastic Compute Cloud, (EC2) was designed to automatically check the status of your instances. These status checks cannot be disabled and are automatically enabled by default. However, they can be used for health-monitoring purposes.
Amazon Web Services (AWS), status checks are simple but very effective. AWS performs a series system status checks and instances status checks every minute. Each status check returns a pass/fail message. If all the status checks are successful, the instance is considered healthy and its status is set as OK. If the status checks fail, the instance will be reported as impaired.
What health checks does EC2 actually perform and what are they? The status checks at the system level monitor network connectivity, power, and physical host-level software and hardware. There are also checks at the instance level. These checks look for errors in network or startup configurations, memory loss, file system corruption, and failed system-level status checks. There are many other operating system or situation checks that can be performed. There are checks that occur when an instance of the operating system is rebooted.
AWS allows you to view the status of each instance through the console. However, unless you are trying to resolve a specific issue, it is unlikely that it will be practical to manually monitor their status. It is much easier to automate the process. The status checks are already automated. Administrators are probably not automating, but they should. This is what happens when there is a failure in the status check.
One way is to create a “status alarm”. This will allow EC2 to send an e mail message to the correct recipient in the event of problems that EC2 cannot resolve automatically. Let’s now take a look at setting up a status alarm.
Open the Amazon EC2 console, and log in. Next, click on Instances in the navigation pane and then click the instance for which a status alarm would be set up. Go to the Status Checks tab at the bottom of your screen. You can also view the results of the most recent status check results by clicking on this tab. Figure 1 shows that the system reachability, instance reachability, and security checks for the current instance have all been passed.
[Click on the image to see a larger view.] Figure 1: The Status Checks tab shows the results of instance checks. You can check again to ensure that the correct instance has been selected. Next, click on the Create Status Alarm button as shown in Figure 2. The interface will display the Create Alarm dialog box as shown in Figure 2.
[Click on the image to see a larger version.] Figure 2: To set up a status alarm, you can use the Create Alarm dialog box. You will notice the first thing you’ll notice in the above figure is that the Send Notification to option has been set to Storage Gateway. This is incorrect. Click on the Create Topic link. This will allow you to manually enter a topic and an email address for the recipient who should receive alarms. Figure 3 shows how this works.
[Click on the image to see a larger view.] Figure 3: The Create alarm dialog box allows you to customize the settings. An alarm is not just intended to send an email address. It can also attempt to resolve the situation. You can also automate remediation by selecting the Take the Action checkbox and then choosing the actions you wish to take.