How to Monitor the Status of Amazon EC2 Instances?

We’re at a time where monitoring your network takes great importance when it comes down to network management. Cloud computing is a solution everyone is going towards and instead of having to buy the physical hardware, virtualization is a much more cost-effective derivative. In order to ensure the availability and reliability of your Amazon instances, it is important that you know how to monitor the instances from the AWS Web Console.

Collecting data from all the points of your AWS solutions is important as it is really helpful in debugging a failure especially one which might have made multiple points inoperable. Monitoring is no easy task but it indeed is worth the effort and the time put in considering it can save you a longer downtime. In order to be on top of your EC2 instances, it is recommended that you measure the performance of your instance at different times with different loads and see the reaction of the instance. This will help you in concluding the maximum capacity of your instance.

Amazon EC2

You can also create images of your instances often so you can be quickly back online in case of a data loss or a hardware failure. Nonetheless, moving on to the topic at hand, there are two types of monitoring options that AWS provides i.e. automated monitoring in which you have to configure the tools to do all the monitoring that you need. The second type is manual monitoring which, as obvious from the name, involves manual interventions of the IT admins to reach the desired outcome. We will be focusing on automated monitoring in this guide.

Instance Status Checks

Amazon EC2 regularly performs automated checks on your running EC2 instances in order to see if there are any problems with the instance. Problems that might prevent the instance from running applications. These status checks are done every minute so you are always updated on the status of your EC2 instances. The result of the status check is either a pass or a fail.

There are two types of checks that are performed, System status checks and Instance status checks. System status checks are problems that require AWS involvement to fix the issue such as power loss, no network connectivity, etc. Instance status checks need your involvement to repair the issue and often detect problems like a corrupted file system, incorrect networking configuration, etc.

Viewing Status Checks

You can view the status checks of your EC2 instances on the AWS Management Console. Here’s how to view it:

  1. Log in to the AWS Management Console and go to EC2.
  2. From the navigation pane on the left-hand side, click Instances.
  3. Now, on the Instances page, click on Status Checks under the instances list.
    EC2 Status Checks
  4. Make sure to select the instance for which you want to see the status check. If anything fails, you can find more information about it under Monitoring.

Monitoring Amazon EC2 Instances

Other than Status checks, you can find additional information about your instance under Monitoring. It shows information about various metrics via real-time graphs so that it is easier for you to comprehend and read. From CPU Utilization to disk operations such as disk read or disk writes, from inbound network to outbound network in bytes, all of it and much more are available under Monitoring.

Here’s how to view the data:

  1. Go to the EC2 Management Console.
  2. On the left-hand side, click on Instances and then select the Instance for which you wish to see the data.
  3. Click Monitoring in the tab below to view various information in real-time.
    EC2 Monitoring Tab
  4. You can also change the graphs to show the collected data of various periods; up to the last two weeks. To do this, just choose an option in the Showing data for the drop-down menu on the top-right corner of the tab.
  5. Click on a graph to change how the data is collected for the specific metric. You can change the Period as well as the Statistic of the metric.
    Monitoring Details
  6. For more detailed monitoring, you can enable CloudWatch detailed monitoring which will cost you a bit more. To do this, just click on the Enable Detailed Monitoring option provided and then click Yes, Enable on the pop-up dialog box. Then, click Close.

Creating an Alarm

You can create alarms so that you are notified whenever the metrics reach a threshold that you specify in the alarm settings. An alarm can be easily created via the EC2 Management Console. You can create various alarms that perform certain actions such as stop an instance, reboot or terminate the Amazon EC2 instance. To create an alarm using the Amazon EC2 Console, do the following:

    1. Login to the EC2 Management console.
    2. Go to Instances from the navigation pane on the left-hand side.
    3. Select the instance for which you wish to create an alarm.
    4. Go to the Monitoring tab and then click the Create Alarm button.
      EC2 Monitoring Tab
    5. Click on the create topic option to give the notification a title.
    6. After that, provide the email addresses that should receive the notification in the With these recipients box.
    7. If you wish to take any action when the alarm is triggered, check the Take the action box.
    8. Then, choose if you wish to reboot the instance which means restart the operating system, stop the instance, terminate, or recover the instance.
      Creating an Alarm
    9. Choose the specific metric for which you wish to create the alarm and then provide a criteria for the alarm policy. For example, if you wish to be notified whenever the CPU Utilization reaches/exceeds 80 percent, leave Whenever to Average and set the Is to >= to 80. After that, you can provide a period for the threshold.
    10. Finally, give the alarm a name in the Name of alarm box and then click the Create Alarm button.
    11. This will create your alarm and you will be notified whenever the metric threshold reaches your provided threshold.

Similarly, you can create status checks alarms using which you can perform the same actions if a certain status check fails. To create a status check alarm, go to the Status Checks tab, and then click on the Create Status Check Alarm button. The rest of the procedure is the same as above.

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.